BlueDice commited on
Commit
eb0c50f
·
1 Parent(s): 53966d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -1
app.py CHANGED
@@ -1,3 +1,26 @@
 
1
  import gradio as gr
2
 
3
- gr.Interface.load("models/BlueDice/Katakuri-350m-onnx").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from handler import SweetCommander
2
  import gradio as gr
3
 
4
+ controller = SweetCommander()
5
+
6
+ with gr.Blocks() as demo:
7
+ history = gr.State([])
8
+ with gr.Row() as row:
9
+ with gr.Column():
10
+ user_name = gr.Textbox(label="Name", placeholder="Enter your name")
11
+ user_input = gr.Textbox(label="Input", placeholder="Enter your message")
12
+ button = gr.Button("Enter")
13
+ with gr.Column():
14
+ output = gr.Textbox(label="Response")
15
+
16
+ def guess_letter(user_name, user_input):
17
+ response = controller(user_name, user_input)
18
+ return {
19
+ output: response
20
+ }
21
+ button.click(
22
+ guess_letter,
23
+ [user_name, user_input],
24
+ [output]
25
+ )
26
+ demo.launch()