Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
|
@@ -1022,7 +1022,8 @@ async def stream_chat_completion(
|
|
| 1022 |
yield line + "\n"
|
| 1023 |
elif line.startswith("0:"):
|
| 1024 |
# LMArena format: 0:"text"\n
|
| 1025 |
-
|
|
|
|
| 1026 |
else:
|
| 1027 |
yield line + "\n"
|
| 1028 |
|
|
@@ -1781,4 +1782,4 @@ PYTHON_EOF
|
|
| 1781 |
EXPOSE 7860
|
| 1782 |
|
| 1783 |
# Run the application
|
| 1784 |
-
CMD ["python", "/app/app.py"]
|
|
|
|
| 1022 |
yield line + "\n"
|
| 1023 |
elif line.startswith("0:"):
|
| 1024 |
# LMArena format: 0:"text"\n
|
| 1025 |
+
content = line[2:].strip('"')
|
| 1026 |
+
yield f"data: {json.dumps({'choices': [{'delta': {'content': content}}]})}\n\n"
|
| 1027 |
else:
|
| 1028 |
yield line + "\n"
|
| 1029 |
|
|
|
|
| 1782 |
EXPOSE 7860
|
| 1783 |
|
| 1784 |
# Run the application
|
| 1785 |
+
CMD ["python", "/app/app.py"]
|