Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files- main.py +4 -2
- requirements.txt +115 -0
main.py
CHANGED
|
@@ -26,7 +26,7 @@ def chatwith_blenderbot400m():
|
|
| 26 |
def chatwith_qwen2_1point5b_instruct():
|
| 27 |
chatbot = pipeline(task="text-generation", model="Qwen/Qwen2-1.5B-Instruct")
|
| 28 |
messages = [{"role": "user", "content": "What are some fun activities I can do in the winter?"}]
|
| 29 |
-
|
| 30 |
messages = chatbot(messages, max_new_tokens=50)[0]["generated_text"]
|
| 31 |
print(messages)
|
| 32 |
|
|
@@ -34,7 +34,8 @@ def chatwith_qwen2_1point5b_instruct():
|
|
| 34 |
print(messages)
|
| 35 |
messages = chatbot(messages, max_new_tokens=50)[0]["generated_text"]
|
| 36 |
print(messages)
|
| 37 |
-
|
|
|
|
| 38 |
def chatwith_qwen2_1point5b_instruct(prompt, max_newtokens):
|
| 39 |
print("Aaaaa")
|
| 40 |
chatbot = pipeline(task="text-generation", model="Qwen/Qwen2-1.5B-Instruct")
|
|
@@ -43,6 +44,7 @@ def chatwith_qwen2_1point5b_instruct(prompt, max_newtokens):
|
|
| 43 |
messages = chatbot(messages, max_new_tokens=max_newtokens)[0]["generated_text"]
|
| 44 |
return messages
|
| 45 |
|
|
|
|
| 46 |
#chatwith_blenderbot400m()
|
| 47 |
#chatwith_qwen2_1point5b_instruct()
|
| 48 |
|
|
|
|
| 26 |
def chatwith_qwen2_1point5b_instruct():
|
| 27 |
chatbot = pipeline(task="text-generation", model="Qwen/Qwen2-1.5B-Instruct")
|
| 28 |
messages = [{"role": "user", "content": "What are some fun activities I can do in the winter?"}]
|
| 29 |
+
|
| 30 |
messages = chatbot(messages, max_new_tokens=50)[0]["generated_text"]
|
| 31 |
print(messages)
|
| 32 |
|
|
|
|
| 34 |
print(messages)
|
| 35 |
messages = chatbot(messages, max_new_tokens=50)[0]["generated_text"]
|
| 36 |
print(messages)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
def chatwith_qwen2_1point5b_instruct(prompt, max_newtokens):
|
| 40 |
print("Aaaaa")
|
| 41 |
chatbot = pipeline(task="text-generation", model="Qwen/Qwen2-1.5B-Instruct")
|
|
|
|
| 44 |
messages = chatbot(messages, max_new_tokens=max_newtokens)[0]["generated_text"]
|
| 45 |
return messages
|
| 46 |
|
| 47 |
+
|
| 48 |
#chatwith_blenderbot400m()
|
| 49 |
#chatwith_qwen2_1point5b_instruct()
|
| 50 |
|
requirements.txt
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
absl-py==2.1.0
|
| 2 |
+
aiofiles==23.2.1
|
| 3 |
+
altair==5.3.0
|
| 4 |
+
annotated-types==0.6.0
|
| 5 |
+
anyio==4.3.0
|
| 6 |
+
astunparse==1.6.3
|
| 7 |
+
attrs==23.2.0
|
| 8 |
+
certifi==2024.2.2
|
| 9 |
+
charset-normalizer==3.3.2
|
| 10 |
+
chex==0.1.86
|
| 11 |
+
click==8.1.7
|
| 12 |
+
contourpy==1.2.1
|
| 13 |
+
cycler==0.12.1
|
| 14 |
+
dnspython==2.6.1
|
| 15 |
+
email_validator==2.1.1
|
| 16 |
+
etils==1.9.1
|
| 17 |
+
fastapi==0.111.0
|
| 18 |
+
fastapi-cli==0.0.3
|
| 19 |
+
ffmpy==0.3.2
|
| 20 |
+
filelock==3.14.0
|
| 21 |
+
flatbuffers==24.3.25
|
| 22 |
+
flax==0.8.4
|
| 23 |
+
fonttools==4.51.0
|
| 24 |
+
fsspec==2024.3.1
|
| 25 |
+
gast==0.5.4
|
| 26 |
+
google-pasta==0.2.0
|
| 27 |
+
gradio==4.31.0
|
| 28 |
+
gradio_client==0.16.2
|
| 29 |
+
grpcio==1.64.1
|
| 30 |
+
h11==0.14.0
|
| 31 |
+
h5py==3.11.0
|
| 32 |
+
httpcore==1.0.5
|
| 33 |
+
httptools==0.6.1
|
| 34 |
+
httpx==0.27.0
|
| 35 |
+
huggingface-hub==0.23.0
|
| 36 |
+
idna==3.7
|
| 37 |
+
importlib_resources==6.4.0
|
| 38 |
+
jax==0.4.28
|
| 39 |
+
jaxlib==0.4.28
|
| 40 |
+
Jinja2==3.1.4
|
| 41 |
+
jsonschema==4.22.0
|
| 42 |
+
jsonschema-specifications==2023.12.1
|
| 43 |
+
keras==3.3.3
|
| 44 |
+
kiwisolver==1.4.5
|
| 45 |
+
libclang==18.1.1
|
| 46 |
+
Markdown==3.6
|
| 47 |
+
markdown-it-py==3.0.0
|
| 48 |
+
MarkupSafe==2.1.5
|
| 49 |
+
matplotlib==3.8.4
|
| 50 |
+
mdurl==0.1.2
|
| 51 |
+
ml-dtypes==0.3.2
|
| 52 |
+
mpmath==1.3.0
|
| 53 |
+
msgpack==1.0.8
|
| 54 |
+
namex==0.0.8
|
| 55 |
+
nest-asyncio==1.6.0
|
| 56 |
+
networkx==3.3
|
| 57 |
+
numpy==1.26.4
|
| 58 |
+
opt-einsum==3.3.0
|
| 59 |
+
optax==0.2.2
|
| 60 |
+
optree==0.11.0
|
| 61 |
+
orbax-checkpoint==0.5.15
|
| 62 |
+
orjson==3.10.3
|
| 63 |
+
packaging==24.0
|
| 64 |
+
pandas==2.2.2
|
| 65 |
+
pillow==10.3.0
|
| 66 |
+
protobuf==4.25.3
|
| 67 |
+
pydantic==2.7.1
|
| 68 |
+
pydantic_core==2.18.2
|
| 69 |
+
pydub==0.25.1
|
| 70 |
+
Pygments==2.18.0
|
| 71 |
+
pyparsing==3.1.2
|
| 72 |
+
python-dateutil==2.9.0.post0
|
| 73 |
+
python-dotenv==1.0.1
|
| 74 |
+
python-multipart==0.0.9
|
| 75 |
+
pytz==2024.1
|
| 76 |
+
PyYAML==6.0.1
|
| 77 |
+
referencing==0.35.1
|
| 78 |
+
regex==2024.5.15
|
| 79 |
+
requests==2.31.0
|
| 80 |
+
rich==13.7.1
|
| 81 |
+
rpds-py==0.18.1
|
| 82 |
+
ruff==0.4.4
|
| 83 |
+
safetensors==0.4.3
|
| 84 |
+
scipy==1.13.1
|
| 85 |
+
semantic-version==2.10.0
|
| 86 |
+
shellingham==1.5.4
|
| 87 |
+
six==1.16.0
|
| 88 |
+
sniffio==1.3.1
|
| 89 |
+
starlette==0.37.2
|
| 90 |
+
sympy==1.12.1
|
| 91 |
+
tensorboard==2.16.2
|
| 92 |
+
tensorboard-data-server==0.7.2
|
| 93 |
+
tensorflow==2.16.1
|
| 94 |
+
tensorflow-io-gcs-filesystem==0.37.0
|
| 95 |
+
tensorstore==0.1.60
|
| 96 |
+
termcolor==2.4.0
|
| 97 |
+
tf_keras==2.16.0
|
| 98 |
+
tokenizers==0.19.1
|
| 99 |
+
tomlkit==0.12.0
|
| 100 |
+
toolz==0.12.1
|
| 101 |
+
torch==2.3.1
|
| 102 |
+
tqdm==4.66.4
|
| 103 |
+
transformers==4.41.2
|
| 104 |
+
typer==0.12.3
|
| 105 |
+
typing_extensions==4.11.0
|
| 106 |
+
tzdata==2024.1
|
| 107 |
+
ujson==5.9.0
|
| 108 |
+
urllib3==2.2.1
|
| 109 |
+
uvicorn==0.29.0
|
| 110 |
+
uvloop==0.19.0
|
| 111 |
+
watchfiles==0.21.0
|
| 112 |
+
websockets==11.0.3
|
| 113 |
+
Werkzeug==3.0.3
|
| 114 |
+
wrapt==1.16.0
|
| 115 |
+
zipp==3.19.2
|