HakanKilic01 commited on
Commit
b52a718
1 Parent(s): ebb322e

5th commit

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -1,13 +1,16 @@
 
1
  import gradio as gr
2
 
3
- def greet(prompt):
4
- return "Hello " + prompt + "!!"
5
 
6
- iface = gr.Interface(
7
- fn=greet,
8
- inputs=gr.Textbox(lines=4, placeholder="Prompt here..."),
9
- outputs=gr.Textbox(lines=4),
10
- )
11
- iface.launch()
12
 
13
 
 
 
 
1
+ import random
2
  import gradio as gr
3
 
4
+ def prompt(message, history):
5
+ return random.choice(["Yes", "No"])
6
 
7
+ demo = gr.ChatInterface(prompt,
8
+ title="codeBot",
9
+ description="Ask me a question"
10
+ retry_btn="Retry",
11
+ undo_btn=None,
12
+ clear_btn="Clear")
13
 
14
 
15
+
16
+ demo.launch()