Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
|
|
|
| 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)
|