Spaces:
Running
on
Zero
Running
on
Zero
DongfuJiang
commited on
Commit
•
2bed478
1
Parent(s):
e910368
update
Browse files- app.py +2 -2
- requirements.txt +155 -6
app.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3 |
import gradio as gr
|
4 |
import sys
|
5 |
import copy
|
6 |
-
|
7 |
from datasets import load_dataset
|
8 |
from typing import List
|
9 |
from llama_cpp import Llama
|
@@ -60,7 +60,7 @@ Your evaluation output:
|
|
60 |
# )
|
61 |
scorer = TIGERScorer(model_name="TIGER-Lab/TIGERScore-13B")
|
62 |
|
63 |
-
|
64 |
def generate_text_hf(input_context, generation_instruction, hypo_output, max_new_tokens=1024, temperature=0.7, top_p=1.0):
|
65 |
global scorer
|
66 |
scorer.model = scorer.model.to("cuda")
|
|
|
3 |
import gradio as gr
|
4 |
import sys
|
5 |
import copy
|
6 |
+
import spaces
|
7 |
from datasets import load_dataset
|
8 |
from typing import List
|
9 |
from llama_cpp import Llama
|
|
|
60 |
# )
|
61 |
scorer = TIGERScorer(model_name="TIGER-Lab/TIGERScore-13B")
|
62 |
|
63 |
+
@spaces.GPU(duration=60)
|
64 |
def generate_text_hf(input_context, generation_instruction, hypo_output, max_new_tokens=1024, temperature=0.7, top_p=1.0):
|
65 |
global scorer
|
66 |
scorer.model = scorer.model.to("cuda")
|
requirements.txt
CHANGED
@@ -1,8 +1,157 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
gradio==4.24.0
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
multiprocess==0.70.15
|
8 |
-
sentencepiece
|
|
|
1 |
+
accelerate==0.28.0
|
2 |
+
aiofiles==23.2.1
|
3 |
+
aiohttp==3.9.3
|
4 |
+
aiosignal==1.3.1
|
5 |
+
altair==5.2.0
|
6 |
+
annotated-types==0.6.0
|
7 |
+
anyio==3.7.1
|
8 |
+
apache-beam==2.55.0
|
9 |
+
appdirs==1.4.4
|
10 |
+
async-timeout==4.0.3
|
11 |
+
attrs==23.2.0
|
12 |
+
beautifulsoup4==4.12.3
|
13 |
+
bitsandbytes==0.43.0
|
14 |
+
Brotli==1.1.0
|
15 |
+
bs4==0.0.2
|
16 |
+
certifi==2024.2.2
|
17 |
+
charset-normalizer==3.3.2
|
18 |
+
click==8.1.7
|
19 |
+
cloudpickle==2.2.1
|
20 |
+
colorama==0.4.6
|
21 |
+
contourpy==1.2.0
|
22 |
+
crcmod==1.7
|
23 |
+
cycler==0.12.1
|
24 |
+
dacite==1.8.1
|
25 |
+
datasets==2.18.0
|
26 |
+
dill==0.3.8
|
27 |
+
diskcache==5.6.3
|
28 |
+
distro==1.9.0
|
29 |
+
dnspython==2.6.1
|
30 |
+
docker-pycreds==0.4.0
|
31 |
+
docopt==0.6.2
|
32 |
+
exceptiongroup==1.1.3
|
33 |
+
fastapi==0.110.0
|
34 |
+
fastavro==1.9.4
|
35 |
+
fasteners==0.19
|
36 |
+
ffmpy==0.3.2
|
37 |
+
filelock==3.13.1
|
38 |
+
fire==0.6.0
|
39 |
+
fonttools==4.50.0
|
40 |
+
frozenlist==1.4.1
|
41 |
+
fsspec==2024.2.0
|
42 |
+
gdcm==1.1
|
43 |
+
gdown==5.1.0
|
44 |
+
gitdb==4.0.11
|
45 |
+
GitPython==3.1.42
|
46 |
+
gmpy2==2.1.2
|
47 |
gradio==4.24.0
|
48 |
+
gradio_client==0.14.0
|
49 |
+
grpcio==1.62.1
|
50 |
+
h11==0.14.0
|
51 |
+
hdfs==2.7.3
|
52 |
+
httpcore==1.0.5
|
53 |
+
httplib2==0.22.0
|
54 |
+
httpx==0.27.0
|
55 |
+
huggingface-hub==0.22.2
|
56 |
+
idna==3.6
|
57 |
+
importlib_resources==6.4.0
|
58 |
+
inflate64==1.0.0
|
59 |
+
Jinja2==3.1.3
|
60 |
+
joblib==1.3.2
|
61 |
+
Js2Py==0.74
|
62 |
+
jsonpickle==3.0.3
|
63 |
+
jsonschema==4.21.1
|
64 |
+
jsonschema-specifications==2023.12.1
|
65 |
+
kiwisolver==1.4.5
|
66 |
+
llama_cpp_python==0.2.57
|
67 |
+
markdown-it-py==3.0.0
|
68 |
+
MarkupSafe==2.1.3
|
69 |
+
matplotlib==3.8.3
|
70 |
+
mdurl==0.1.2
|
71 |
+
mpmath==1.3.0
|
72 |
+
multidict==6.0.5
|
73 |
+
multiprocess==0.70.15
|
74 |
+
multivolumefile==0.2.3
|
75 |
+
networkx==3.1
|
76 |
+
nltk==3.8.1
|
77 |
+
numpy==1.26.4
|
78 |
+
objsize==0.7.0
|
79 |
+
openai==1.14.3
|
80 |
+
orjson==3.10.0
|
81 |
+
packaging==24.0
|
82 |
+
pandas==2.2.1
|
83 |
+
peft==0.10.0
|
84 |
+
pillow==10.2.0
|
85 |
+
pip==23.3.1
|
86 |
+
proto-plus==1.23.0
|
87 |
+
protobuf==4.25.3
|
88 |
+
psutil==5.9.8
|
89 |
+
py7zr==0.21.0
|
90 |
+
pyarrow==14.0.2
|
91 |
+
pyarrow-hotfix==0.6
|
92 |
+
pybcj==1.0.2
|
93 |
+
pycryptodomex==3.20.0
|
94 |
+
pydantic==2.6.4
|
95 |
+
pydantic_core==2.16.3
|
96 |
+
pydicom==2.4.4
|
97 |
+
pydot==1.4.2
|
98 |
+
pydub==0.25.1
|
99 |
+
Pygments==2.17.2
|
100 |
+
pyjsparser==2.7.1
|
101 |
+
pymongo==4.6.3
|
102 |
+
pyparsing==3.1.2
|
103 |
+
pyppmd==1.1.0
|
104 |
+
PySocks==1.7.1
|
105 |
+
pystun==0.1.0
|
106 |
+
pystun3==1.0.0
|
107 |
+
python-dateutil==2.9.0.post0
|
108 |
+
python-multipart==0.0.9
|
109 |
+
pytz==2024.1
|
110 |
+
PyYAML==6.0.1
|
111 |
+
pyzstd==0.15.10
|
112 |
+
referencing==0.34.0
|
113 |
+
regex==2023.12.25
|
114 |
+
requests==2.31.0
|
115 |
+
rich==13.7.1
|
116 |
+
rpds-py==0.18.0
|
117 |
+
ruff==0.3.4
|
118 |
+
safetensors==0.4.2
|
119 |
+
scipy==1.12.0
|
120 |
+
semantic-version==2.10.0
|
121 |
+
sentencepiece==0.2.0
|
122 |
+
sentry-sdk==1.44.0
|
123 |
+
setproctitle==1.3.3
|
124 |
+
setuptools==68.2.2
|
125 |
+
shellingham==1.5.4
|
126 |
+
six==1.16.0
|
127 |
+
smmap==5.0.1
|
128 |
+
sniffio==1.3.0
|
129 |
+
soupsieve==2.5
|
130 |
+
spaces==0.25.0
|
131 |
+
starlette==0.36.3
|
132 |
+
sympy==1.12
|
133 |
+
termcolor==2.4.0
|
134 |
+
texttable==1.7.0
|
135 |
+
tiktoken==0.6.0
|
136 |
+
tokenizers==0.15.2
|
137 |
+
tomlkit==0.12.0
|
138 |
+
toolz==0.12.1
|
139 |
+
torch==2.2.2
|
140 |
+
tqdm==4.66.2
|
141 |
+
transformers==4.37.0
|
142 |
+
triton==2.2.0
|
143 |
+
typer==0.11.1
|
144 |
+
typing_extensions==4.9.0
|
145 |
+
tzdata==2024.1
|
146 |
+
tzlocal==5.2
|
147 |
+
urllib3==2.2.1
|
148 |
+
uvicorn==0.29.0
|
149 |
+
wandb==0.16.5
|
150 |
+
websockets==11.0.3
|
151 |
+
wget==3.2
|
152 |
+
wheel==0.41.2
|
153 |
+
xxhash==3.4.1
|
154 |
+
yarl==1.9.4
|
155 |
+
zstandard==0.22.0
|
156 |
+
tigerscore @ git+https://github.com/TIGER-AI-Lab/TIGERScore.git@24acaab8f8caf652468d81c9b97a6e0ed2fc3447
|
157 |
multiprocess==0.70.15
|
|