epicDev123 commited on
Commit
ba954c3
Β·
verified Β·
1 Parent(s): 2934abb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
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(fn=chat_with_1111,
22
- inputs=gr.Textbox(lines=2, placeholder="Ask 1111 a question..."),
23
- outputs="text",
24
- live=True,
25
- title="Chat with 1111",
26
- description="Talk to 1111, an AI trained with DialoGPT medium!")
 
 
 
 
 
 
 
 
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()