Spaces:
Sleeping
Sleeping
Fix GRADIO version.
Browse files
app.py
CHANGED
@@ -9,6 +9,13 @@ def classify_text(text):
|
|
9 |
result = classifier(text)[0]
|
10 |
return f"{result['label']} with score {result['score']}"
|
11 |
|
12 |
-
#
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
result = classifier(text)[0]
|
10 |
return f"{result['label']} with score {result['score']}"
|
11 |
|
12 |
+
# Check if GRADIO_SERVER_PORT is set, otherwise use a different port
|
13 |
+
import os
|
14 |
+
port = int(os.getenv('GRADIO_SERVER_PORT', 7861))
|
15 |
+
|
16 |
+
# Launch the Gradio interface on the specified port
|
17 |
+
iface.launch(server_port=port)
|
18 |
+
|
19 |
+
# Streamlit code
|
20 |
+
st.title('IMDb Sentiment Analysis')
|
21 |
+
st.write('This project performs sentiment analysis on IMDb movie reviews using Streamlit.')
|