LogicDataSolutions commited on
Commit
66570ef
·
verified ·
1 Parent(s): 9f952c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -93,17 +93,7 @@ add_ping_route(app, call_langflow)
93
 
94
 
95
 
96
- # Create Gradio Chat Interface
97
- chat = gr.ChatInterface(
98
- fn=call_langflow,
99
- title="CPA Chatbot POC",
100
- description="You can use this chatbot to answer questions related to Crown Pointe Academy policies.",
101
- examples=["Summarize the school's uniform policy", "Can a student wear earrings?"],
102
- retry_btn=None,
103
- undo_btn=None,
104
- )
105
-
106
- # Wrap in Blocks to add custom CSS and preserve theme
107
  with gr.Blocks(
108
  css="""
109
  footer {display: none !important;}
@@ -112,7 +102,14 @@ with gr.Blocks(
112
  .svelte-1p1dq6v {display: none !important;}
113
  """
114
  ) as demo:
115
- chat.render()
 
 
 
 
 
 
 
116
 
117
- if __name__ == "__main__":
118
- demo.launch(show_api=False)
 
93
 
94
 
95
 
96
+ # Create Gradio Chat Interface with custom CSS
 
 
 
 
 
 
 
 
 
 
97
  with gr.Blocks(
98
  css="""
99
  footer {display: none !important;}
 
102
  .svelte-1p1dq6v {display: none !important;}
103
  """
104
  ) as demo:
105
+ gr.ChatInterface(
106
+ fn=call_langflow,
107
+ title="CPA Chatbot POC",
108
+ description="You can use this chatbot to answer questions related to Crown Pointe Academy policies.",
109
+ examples=["Summarize the school's uniform policy", "Can a student wear earrings?"],
110
+ retry_btn=None,
111
+ undo_btn=None,
112
+ )
113
 
114
+ # Mount Gradio app to FastAPI at root path
115
+ app = gr.mount_gradio_app(app, demo, path="/", show_api=False)