Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,12 +18,20 @@ def chat_with_1111(input_text):
|
|
| 18 |
return response
|
| 19 |
|
| 20 |
# Define the Gradio interface
|
| 21 |
-
iface = gr.Interface(
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
# Launch the interface (This will run on Aifaces when uploaded)
|
| 29 |
iface.launch()
|
|
|
|
| 18 |
return response
|
| 19 |
|
| 20 |
# Define the Gradio interface
|
| 21 |
+
iface = gr.Interface(
|
| 22 |
+
fn=chat_with_1111,
|
| 23 |
+
inputs=gr.Textbox(lines=2, placeholder="Ask 1111 a question..."), # Input textbox
|
| 24 |
+
outputs="text", # Text output
|
| 25 |
+
live=False, # Do not send input live; only on button click
|
| 26 |
+
title="Chat with 1111",
|
| 27 |
+
description="Click the button to chat with 1111, an AI trained with DialoGPT medium!",
|
| 28 |
+
layout="vertical",
|
| 29 |
+
allow_flagging="never", # Disable flagging for simplicity
|
| 30 |
+
theme="compact", # Optional: compact design
|
| 31 |
+
# Add a button with label "Chat with 1111"
|
| 32 |
+
examples=[["Hello!"]], # Optional: example input for user to try out
|
| 33 |
+
buttons=[gr.Button("Chat with 1111")] # This adds a button
|
| 34 |
+
)
|
| 35 |
|
| 36 |
# Launch the interface (This will run on Aifaces when uploaded)
|
| 37 |
iface.launch()
|