OjciecTadeusz commited on
Commit
ceeb878
·
verified ·
1 Parent(s): 8cdb111

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -113,13 +113,11 @@ def chat_interface(messages):
113
  return chat_history
114
 
115
  # Create Gradio interface
116
- demo = gr.Chatbot(
117
- chat_interface,
118
- type="messages"
119
- )
120
 
121
  # Mount both FastAPI and Gradio
122
- app = gr.mount_gradio_app(app, demo, path="/")
123
 
124
  # For running with uvicorn directly
125
  if __name__ == "__main__":
 
113
  return chat_history
114
 
115
  # Create Gradio interface
116
+ def gradio_app():
117
+ return gr.Chatbot(chat_interface, type="messages", value=[])
 
 
118
 
119
  # Mount both FastAPI and Gradio
120
+ app = gr.mount_gradio_app(app, gradio_app(), path="/")
121
 
122
  # For running with uvicorn directly
123
  if __name__ == "__main__":