generated from Seraph19asfaw/Seraph19asfaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_history
203 lines (203 loc) · 6.84 KB
/
.bash_history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
pkg update
pkg upgrade
pkg install python
pkg install git
pkg search <transformer>
pkg search transformer
pkg search <transformers>
pkg search transformers
pkg install transformers
pip install transformers
pip --version
pkg install python-pip
pip install python-telegram-bot requests
python-telegram-bot==13.7
requests
python-telegram-bot==13.7
requests==2.26.0
web3==5.25.0 # If you need blockchain integration (for Ethereum-based tokens)
import sagemaker
import boto3
from sagemaker.huggingface import HuggingFaceModel
try:
role = sagemaker.get_execution_role()
except ValueError:
iam = boto3.client('iam')
role = iam.get_role(RoleName='sagemaker_execution_role')['Role']['Arn']
# Hub Model configuration. https://huggingface.co/models
hub = {
'HF_MODEL_ID':'Seraph19/Suea',
'HF_TASK':'text2text-generation'
}
# create Hugging Face Model Class
huggingface_model = HuggingFaceModel(
transformers_version='4.37.0',
pytorch_version='2.1.0',
py_version='py310',
env=hub,
role=role,
)
# deploy model to SageMaker Inference
predictor = huggingface_model.deploy(
initial_instance_count=1, # number of instances
instance_type='ml.m5.xlarge' # ec2 instance type
)
predictor.predict({
"inputs": "The answer to the universe is",
})
import sagemaker
import boto3
from sagemaker.huggingface import HuggingFaceModel
try:
role = sagemaker.get_execution_role()
except ValueError:
iam = boto3.client('iam')
role = iam.get_role(RoleName='sagemaker_execution_role')['Role']['Arn']
# Hub Model configuration. https://huggingface.co/models
hub = {
'HF_MODEL_ID':'Seraph19/Suea',
'HF_TASK':'text2text-generation'
}
# create Hugging Face Model Class
huggingface_model = HuggingFaceModel(
transformers_version='4.37.0',
pytorch_version='2.1.0',
py_version='py310',
env=hub,
role=role,
)
# deploy model to SageMaker Inference
predictor = huggingface_model.deploy(
initial_instance_count=1, # number of instances
instance_type='ml.m5.xlarge' # ec2 instance type
)
predictor.predict({
"inputs": "The answer to the universe is",
})
git clone https://huggingface.co/spaces/Seraph19/Santim
<iframe
src="https://seraph19-santim.hf.space"
frameborder="0"
width="850"
height="450"
></iframe>
git clone https://github.com/seraph19asfaw/python-telegram-bot-flask-example.git
cd python-telegram-bot-flask-example
github.com/seraph19asfaw
https://github.com/huggingface/autotrain-advanced.git
git clone https://huggingface.co/spaces/Seraph19/Santim
https://github.com/huggingface/autotrain-advanced.git
pip install autotrain-advanced
conda create -n autotrain python=3.10
conda activate autotrain
pip install autotrain-advanced
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
conda install -c "nvidia/label/cuda-12.1.0" cuda-nvcc
autotrain app --port 8080 --host 127.0.0.1
autotrain --config <path_to_config_file>
{ pkgs }: {; deps = [; pkgs.python39; pkgs.python39Packages.requests; pkgs.python39Packages.python-telegram-bot; ]; }
TELEGRAM_TOKEN = '7394516855:AAHiH9HlCmBTzyRBHN06vVYNWlxY1qZEgco'
TELEGRAM_TOKEN = ' 7322594950:AAFS4FOOYCdDnJy6VZUM4-6T86_mA18pxjQ '
su -
pkg_add -z git gperf php-7.2.10 cmake
exit
git clone [email protected]:spaces/Seraph19/Santim
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/token', methods=['POST'])
def distribute_token():
if __name__ == '__main__':; app.run(host='0.0.0.0', port=7860)
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/token', methods=['POST'])
def distribute_token():
if __name__ == '__main__':; app.run(host='0.0.0.0', port=7860)
curl -X POST https://seraph19-santim.hf.space/token -H "Content-Type: application/json" -d '{"user_id": 123456, "amount": 10}'
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/token', methods=['POST'])
def distribute_token():
if __name__ == '__main__':; app.run(host='0.0.0.0', port=7860)
Flask==2.0.2
curl -X POST https://seraph19-santim.hf.space/token -H "Content-Type: application/json" -d '{"user_id": "12345", "amount": 10}'
pkg install python
pip install python-telegram-bot requests
python bot.py
# Install vLLM from pip:
pip install vllm
# Load and run the model:
vllm serve "Seraph19/Suea"
# Call the server using curl:
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Seraph19/Suea"
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
git clone https://huggingface.co/spaces/BLACKHOST/TelegramBot
import streamlit as st
x = st.slider('Select a value')
st.write(x, 'squared is', x * x)
git clone [email protected]:Seraph19/Suea
GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:Seraph19/Suea
ssh-keygen -t ed25519 -C "[email protected]"
$ ssh-add ~/.ssh/id_ed25519
git clone https://huggingface.co/Seraph19/Suea
ssh-keygen -t rsa -b 4096 -C "seraph19asfaw"
pbcopy < ~/.ssh/id_rsa.pub
```
pbcopy < ~/.ssh/id_rsa.pub
```
commannd objcopy in package binutils
pbcopy < ~/.ssh/id_rsa
objcopy in pkg binutils
pkg binutils
pkg install binutils
pbcopy < ~/.ssh/id_rsa
objcopy in binutils
ssh-add ~/.ssh/id_ed25519
ssh-keygen -t rsa -b 4096 -C "[email protected]"
save file
copy
objcopy
[email protected]:seraph19/my-repo.git
id_ed25519.pub
ssh-keygen -t ed25519 -C
ssh-keygen -t ed25519 -C"[email protected]"
ssh-add ~/.ssh/id_ed25519
ssh -T [email protected]
cat ~/.ssh/id_rsa.pub
git clone https://huggingface.co/Seraph19/Suea
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Seraph19/Suea
git clone [email protected]:Seraph19/Suea
git clone [email protected]:spaces/levandong/MNIST-detect-deploy-webapp
git clone [email protected]:spaces/onekq-ai/WebApp1K-models-leaderboard
GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:Gameselo/STS-multilingual-mpnet-base-v2
git clone [email protected]:spaces/librarian-bots/huggingface-datasets-semantic-search
git clone [email protected]:RichardErkhov/PotatoOff_-_HamSter-0.2-gguf
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text2text-generation", model="Seraph19/Suea")
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Seraph19/Suea")
import requests
API_URL = "https://api-inference.huggingface.co/models/cardiffnlp/twitter-roberta-base-sentiment-latest"
headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
payload = {
}
response = requests.post(API_URL, headers=headers, json=payload)
response.json() import gradio as gr
gr.load("models/cardiffnlp/twitter-roberta-base-sentiment-latest").launch()
import gradio as gr
gr.load("models/cardiffnlp/twitter-roberta-base-sentiment-latest").launch()
<script
type="module"
src="https://gradio.s3-us-west-2.amazonaws.com/4.36.1/gradio.js"
></script>
<gradio-app src="https://seraph19-cardiffnlp-twitter-roberta-base-sentime-c90bcaf.hf.space"></gradio-app>
git clone https://huggingface.co/spaces/Seraph19/cardiffnlp-twitter-roberta-base-sentiment-latest
git clone https://huggingface.co/spaces/huggingface-projects/llama-3.2-3B-Instruct