Spaces:
Sleeping
Sleeping
Alejadro Sanchez-Giraldo
commited on
Commit
•
434260a
1
Parent(s):
49ea66a
added , model to API response
Browse files
README.md
CHANGED
@@ -47,11 +47,11 @@ LAUNCHDARKLY_SDK_KEY=<LAUNCHDARKLY_SDK_KEY> gunicorn -w 4 -b 0.0.0.0:5001 api:ap
|
|
47 |
|
48 |
# Build your Docker image
|
49 |
|
50 |
-
docker build -t
|
51 |
|
52 |
# Run your Docker container, mapping port 5001 of the container to port 5001 on your host
|
53 |
|
54 |
-
docker run -p 5001:5001
|
55 |
|
56 |
### UI
|
57 |
|
|
|
47 |
|
48 |
# Build your Docker image
|
49 |
|
50 |
+
docker build -t morsisdivine/sentiment .
|
51 |
|
52 |
# Run your Docker container, mapping port 5001 of the container to port 5001 on your host
|
53 |
|
54 |
+
docker run -p 5001:5001 -e LAUNCHDARKLY_SDK_KEY=sdk-9e46ce06-388b-4901-a89a-7cc49eece1c0 morsisdivine/sentiment
|
55 |
|
56 |
### UI
|
57 |
|
api.py
CHANGED
@@ -60,7 +60,7 @@ def analyze_sentiment():
|
|
60 |
translated_results = [{"Sentiment": translate_label(
|
61 |
result['label']), "Confidence": result['score'], "User_input": user_input} for result in results]
|
62 |
|
63 |
-
return jsonify({"name": name, "results": translated_results})
|
64 |
|
65 |
|
66 |
if __name__ == '__main__':
|
|
|
60 |
translated_results = [{"Sentiment": translate_label(
|
61 |
result['label']), "Confidence": result['score'], "User_input": user_input} for result in results]
|
62 |
|
63 |
+
return jsonify({"name": name, "results": translated_results, "model": model_id})
|
64 |
|
65 |
|
66 |
if __name__ == '__main__':
|