Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -91,4 +91,15 @@ async def chat_completion(request: Request):
|
|
91 |
raise e
|
92 |
except Exception as e:
|
93 |
logger.error(f"Unexpected error: {e}")
|
94 |
-
raise HTTPException(status_code=500, detail=str(e))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
raise e
|
92 |
except Exception as e:
|
93 |
logger.error(f"Unexpected error: {e}")
|
94 |
+
raise HTTPException(status_code=500, detail=str(e))
|
95 |
+
|
96 |
+
|
97 |
+
def chat_interface(messages):
|
98 |
+
chat_history = []
|
99 |
+
|
100 |
+
# Create Gradio interface
|
101 |
+
def gradio_app():
|
102 |
+
#return gr.chat_interface(gr.Chatbot(placeholder="placeholder"), type="messages", value=[])
|
103 |
+
return gr.ChatInterface(chat_interface, type="messages")
|
104 |
+
|
105 |
+
# Mount both FastAPI and Gradio
|