Spaces:
Build error
Build error
Upload 3 files
Browse filesUpload docker, requirements and app.py files
- Dockerfile +21 -0
- app.py +18 -0
- requirments.txt +252 -0
Dockerfile
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# Install system dependencies
|
6 |
+
RUN apt-get update && apt-get install -y \
|
7 |
+
build-essential \
|
8 |
+
&& rm -rf /var/lib/apt/lists/*
|
9 |
+
|
10 |
+
# Install Python packages
|
11 |
+
COPY requirements.txt .
|
12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
+
|
14 |
+
# Copy app code
|
15 |
+
COPY . .
|
16 |
+
|
17 |
+
# Streamlit default port
|
18 |
+
EXPOSE 8501
|
19 |
+
|
20 |
+
# Run Streamlit
|
21 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# Load the sentiment analysis model
|
5 |
+
@st.cache_resource
|
6 |
+
def load_model():
|
7 |
+
return pipeline("sentiment-analysis")
|
8 |
+
|
9 |
+
model = load_model()
|
10 |
+
|
11 |
+
# Streamlit interface
|
12 |
+
st.title("🧠 Sentiment Analyzer")
|
13 |
+
user_input = st.text_area("Enter a sentence:")
|
14 |
+
|
15 |
+
if user_input:
|
16 |
+
result = model(user_input)[0]
|
17 |
+
st.write(f"**Sentiment:** {result['label']}")
|
18 |
+
st.write(f"**Confidence:** {round(result['score'], 4)}")
|
requirments.txt
ADDED
@@ -0,0 +1,252 @@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iles==24.1.0
|
2 |
+
aiohappyeyeballs==2.6.1
|
3 |
+
aiohttp==3.11.18
|
4 |
+
aiosignal==1.3.2
|
5 |
+
altair==5.5.0
|
6 |
+
annotated-types==0.7.0
|
7 |
+
anthropic==0.51.0
|
8 |
+
anyio==4.9.0
|
9 |
+
argon2-cffi==23.1.0
|
10 |
+
argon2-cffi-bindings==21.2.0
|
11 |
+
arrow==1.3.0
|
12 |
+
asgiref==3.8.1
|
13 |
+
asttokens==3.0.0
|
14 |
+
async-lru==2.0.5
|
15 |
+
attrs==25.3.0
|
16 |
+
audioop-lts==0.2.1
|
17 |
+
babel==2.17.0
|
18 |
+
backoff==2.2.1
|
19 |
+
bcrypt==4.3.0
|
20 |
+
beautifulsoup4==4.13.3
|
21 |
+
bleach==6.2.0
|
22 |
+
blinker==1.9.0
|
23 |
+
build==1.2.2.post1
|
24 |
+
cachetools==5.5.2
|
25 |
+
certifi==2025.1.31
|
26 |
+
cffi==1.17.1
|
27 |
+
charset-normalizer==3.4.1
|
28 |
+
chromadb==1.0.9
|
29 |
+
click==8.1.8
|
30 |
+
coloredlogs==15.0.1
|
31 |
+
comm==0.2.2
|
32 |
+
dataclasses-json==0.6.7
|
33 |
+
debugpy==1.8.13
|
34 |
+
decorator==5.2.1
|
35 |
+
defusedxml==0.7.1
|
36 |
+
Deprecated==1.2.18
|
37 |
+
distro==1.9.0
|
38 |
+
docarray==0.41.0
|
39 |
+
dotenv==0.9.9
|
40 |
+
durationpy==0.9
|
41 |
+
et_xmlfile==2.0.0
|
42 |
+
executing==2.2.0
|
43 |
+
fastapi==0.115.9
|
44 |
+
fastjsonschema==2.21.1
|
45 |
+
ffmpy==0.5.0
|
46 |
+
filelock==3.18.0
|
47 |
+
flatbuffers==25.2.10
|
48 |
+
fqdn==1.5.1
|
49 |
+
frozenlist==1.6.0
|
50 |
+
fsspec==2025.3.2
|
51 |
+
gitdb==4.0.12
|
52 |
+
GitPython==3.1.44
|
53 |
+
google-auth==2.40.1
|
54 |
+
googleapis-common-protos==1.70.0
|
55 |
+
gradio==5.25.0
|
56 |
+
gradio_client==1.8.0
|
57 |
+
greenlet==3.2.2
|
58 |
+
groovy==0.1.2
|
59 |
+
grpcio==1.71.0
|
60 |
+
h11==0.14.0
|
61 |
+
httpcore==1.0.7
|
62 |
+
httptools==0.6.4
|
63 |
+
httpx==0.28.1
|
64 |
+
httpx-sse==0.4.0
|
65 |
+
huggingface-hub==0.30.2
|
66 |
+
humanfriendly==10.0
|
67 |
+
idna==3.10
|
68 |
+
importlib_metadata==8.6.1
|
69 |
+
importlib_resources==6.5.2
|
70 |
+
ipykernel==6.29.5
|
71 |
+
ipython==9.0.2
|
72 |
+
ipython_pygments_lexers==1.1.1
|
73 |
+
ipywidgets==8.1.5
|
74 |
+
isoduration==20.11.0
|
75 |
+
jedi==0.19.2
|
76 |
+
Jinja2==3.1.6
|
77 |
+
jiter==0.9.0
|
78 |
+
json5==0.12.0
|
79 |
+
jsonpatch==1.33
|
80 |
+
jsonpointer==3.0.0
|
81 |
+
jsonschema==4.23.0
|
82 |
+
jsonschema-specifications==2024.10.1
|
83 |
+
jupyter==1.1.1
|
84 |
+
jupyter-console==6.6.3
|
85 |
+
jupyter-events==0.12.0
|
86 |
+
jupyter-lsp==2.2.5
|
87 |
+
jupyter_client==8.6.3
|
88 |
+
jupyter_core==5.7.2
|
89 |
+
jupyter_server==2.15.0
|
90 |
+
jupyter_server_terminals==0.5.3
|
91 |
+
jupyterlab==4.3.6
|
92 |
+
jupyterlab_pygments==0.3.0
|
93 |
+
jupyterlab_server==2.27.3
|
94 |
+
jupyterlab_widgets==3.0.13
|
95 |
+
kubernetes==32.0.1
|
96 |
+
langchain==0.3.25
|
97 |
+
langchain-community==0.3.24
|
98 |
+
langchain-core==0.3.59
|
99 |
+
langchain-text-splitters==0.3.8
|
100 |
+
langsmith==0.3.42
|
101 |
+
markdown-it-py==3.0.0
|
102 |
+
MarkupSafe==3.0.2
|
103 |
+
marshmallow==3.26.1
|
104 |
+
matplotlib-inline==0.1.7
|
105 |
+
mcp==1.6.0
|
106 |
+
mdurl==0.1.2
|
107 |
+
mistune==3.1.3
|
108 |
+
mmh3==5.1.0
|
109 |
+
mpmath==1.3.0
|
110 |
+
multidict==6.4.3
|
111 |
+
mypy_extensions==1.1.0
|
112 |
+
narwhals==1.41.0
|
113 |
+
nbclient==0.10.2
|
114 |
+
nbconvert==7.16.6
|
115 |
+
nbformat==5.10.4
|
116 |
+
nest-asyncio==1.6.0
|
117 |
+
networkx==3.5
|
118 |
+
notebook==7.3.3
|
119 |
+
notebook_shim==0.2.4
|
120 |
+
numpy==2.2.4
|
121 |
+
nvidia-cublas-cu12==12.6.4.1
|
122 |
+
nvidia-cuda-cupti-cu12==12.6.80
|
123 |
+
nvidia-cuda-nvrtc-cu12==12.6.77
|
124 |
+
nvidia-cuda-runtime-cu12==12.6.77
|
125 |
+
nvidia-cudnn-cu12==9.5.1.17
|
126 |
+
nvidia-cufft-cu12==11.3.0.4
|
127 |
+
nvidia-cufile-cu12==1.11.1.6
|
128 |
+
nvidia-curand-cu12==10.3.7.77
|
129 |
+
nvidia-cusolver-cu12==11.7.1.2
|
130 |
+
nvidia-cusparse-cu12==12.5.4.2
|
131 |
+
nvidia-cusparselt-cu12==0.6.3
|
132 |
+
nvidia-nccl-cu12==2.26.2
|
133 |
+
nvidia-nvjitlink-cu12==12.6.85
|
134 |
+
nvidia-nvtx-cu12==12.6.77
|
135 |
+
oauthlib==3.2.2
|
136 |
+
onnxruntime==1.22.0
|
137 |
+
openai==1.78.1
|
138 |
+
openpyxl==3.1.5
|
139 |
+
opentelemetry-api==1.33.0
|
140 |
+
opentelemetry-exporter-otlp-proto-common==1.33.0
|
141 |
+
opentelemetry-exporter-otlp-proto-grpc==1.33.0
|
142 |
+
opentelemetry-instrumentation==0.54b0
|
143 |
+
opentelemetry-instrumentation-asgi==0.54b0
|
144 |
+
opentelemetry-instrumentation-fastapi==0.54b0
|
145 |
+
opentelemetry-proto==1.33.0
|
146 |
+
opentelemetry-sdk==1.33.0
|
147 |
+
opentelemetry-semantic-conventions==0.54b0
|
148 |
+
opentelemetry-util-http==0.54b0
|
149 |
+
orjson==3.10.16
|
150 |
+
overrides==7.7.0
|
151 |
+
packaging==24.2
|
152 |
+
pandas==2.2.3
|
153 |
+
pandocfilters==1.5.1
|
154 |
+
parso==0.8.4
|
155 |
+
pexpect==4.9.0
|
156 |
+
pillow==11.2.1
|
157 |
+
platformdirs==4.3.7
|
158 |
+
posthog==4.0.1
|
159 |
+
praisonAI==0.0.5
|
160 |
+
praisonaiagents==0.0.76
|
161 |
+
prometheus_client==0.21.1
|
162 |
+
prompt_toolkit==3.0.50
|
163 |
+
propcache==0.3.1
|
164 |
+
protobuf==5.29.4
|
165 |
+
psutil==7.0.0
|
166 |
+
ptyprocess==0.7.0
|
167 |
+
pure_eval==0.2.3
|
168 |
+
pyarrow==20.0.0
|
169 |
+
pyasn1==0.6.1
|
170 |
+
pyasn1_modules==0.4.2
|
171 |
+
pycparser==2.22
|
172 |
+
pydantic==2.11.3
|
173 |
+
pydantic-settings==2.8.1
|
174 |
+
pydantic_core==2.33.1
|
175 |
+
pydeck==0.9.1
|
176 |
+
pydub==0.25.1
|
177 |
+
Pygments==2.19.1
|
178 |
+
PyMuPDF==1.25.5
|
179 |
+
pypdf==5.6.0
|
180 |
+
PyPDF2==3.0.1
|
181 |
+
PyPika==0.48.9
|
182 |
+
pyproject_hooks==1.2.0
|
183 |
+
python-dateutil==2.9.0.post0
|
184 |
+
python-dotenv==1.1.0
|
185 |
+
python-json-logger==3.3.0
|
186 |
+
python-multipart==0.0.20
|
187 |
+
pytz==2025.2
|
188 |
+
PyYAML==6.0.2
|
189 |
+
pyzmq==26.3.0
|
190 |
+
referencing==0.36.2
|
191 |
+
regex==2024.11.6
|
192 |
+
requests==2.32.3
|
193 |
+
requests-oauthlib==2.0.0
|
194 |
+
requests-toolbelt==1.0.0
|
195 |
+
rfc3339-validator==0.1.4
|
196 |
+
rfc3986-validator==0.1.1
|
197 |
+
rich==14.0.0
|
198 |
+
rpds-py==0.24.0
|
199 |
+
rsa==4.9.1
|
200 |
+
ruff==0.11.5
|
201 |
+
safehttpx==0.1.6
|
202 |
+
safetensors==0.5.3
|
203 |
+
semantic-version==2.10.0
|
204 |
+
Send2Trash==1.8.3
|
205 |
+
setuptools==78.1.0
|
206 |
+
shellingham==1.5.4
|
207 |
+
six==1.17.0
|
208 |
+
smmap==5.0.2
|
209 |
+
sniffio==1.3.1
|
210 |
+
soupsieve==2.6
|
211 |
+
SQLAlchemy==2.0.40
|
212 |
+
sse-starlette==2.2.1
|
213 |
+
stack-data==0.6.3
|
214 |
+
starlette==0.45.3
|
215 |
+
streamlit==1.45.1
|
216 |
+
sympy==1.14.0
|
217 |
+
tenacity==9.1.2
|
218 |
+
terminado==0.18.1
|
219 |
+
tiktoken==0.9.0
|
220 |
+
tinycss2==1.4.0
|
221 |
+
tokenizers==0.21.1
|
222 |
+
toml==0.10.2
|
223 |
+
tomlkit==0.13.2
|
224 |
+
torch==2.7.1
|
225 |
+
tornado==6.4.2
|
226 |
+
tqdm==4.67.1
|
227 |
+
traitlets==5.14.3
|
228 |
+
transformers==4.52.4
|
229 |
+
triton==3.3.1
|
230 |
+
typer==0.15.2
|
231 |
+
types-python-dateutil==2.9.0.20241206
|
232 |
+
types-requests==2.32.0.20250602
|
233 |
+
typing-inspect==0.9.0
|
234 |
+
typing-inspection==0.4.0
|
235 |
+
typing_extensions==4.13.1
|
236 |
+
tzdata==2025.2
|
237 |
+
uri-template==1.3.0
|
238 |
+
urllib3==2.3.0
|
239 |
+
uvicorn==0.34.1
|
240 |
+
uvloop==0.21.0
|
241 |
+
watchdog==6.0.0
|
242 |
+
watchfiles==1.0.5
|
243 |
+
wcwidth==0.2.13
|
244 |
+
webcolors==24.11.1
|
245 |
+
webencodings==0.5.1
|
246 |
+
websocket-client==1.8.0
|
247 |
+
websockets==15.0.1
|
248 |
+
widgetsnbextension==4.0.13
|
249 |
+
wrapt==1.17.2
|
250 |
+
yarl==1.20.0
|
251 |
+
zipp==3.21.0
|
252 |
+
zstandard==0.23.0
|