Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,14 +64,18 @@ def predict(message, history):
|
|
| 64 |
# Define the Chatbot component and store it in a variable
|
| 65 |
chatbot_component = gr.Chatbot(label="Business Advice from Jeff Bezos")
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
inputs="text",
|
| 70 |
-
outputs="text",
|
| 71 |
title="Business Advice from Jeff Bezos",
|
| 72 |
-
theme=gr.themes.Soft(),
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
demo.launch(debug=True)
|
|
|
|
| 64 |
# Define the Chatbot component and store it in a variable
|
| 65 |
chatbot_component = gr.Chatbot(label="Business Advice from Jeff Bezos")
|
| 66 |
|
| 67 |
+
with gr.ChatInterface(
|
| 68 |
+
predict,
|
|
|
|
|
|
|
| 69 |
title="Business Advice from Jeff Bezos",
|
| 70 |
+
theme=gr.themes.Soft(),
|
| 71 |
+
chatbot=chatbot_component,
|
| 72 |
+
textbox=gr.Textbox(
|
| 73 |
+
placeholder="Ask Your Question",
|
| 74 |
+
scale=7,
|
| 75 |
+
max_lines=2,
|
| 76 |
+
)
|
| 77 |
+
) as demo:
|
| 78 |
+
demo.load(None, None, chatbot_component) # Removed the reference to the undefined variable
|
| 79 |
+
demo.load(__attachIp, None, None)
|
| 80 |
|
| 81 |
demo.launch(debug=True)
|