yizhangliu commited on
Commit
857a68d
1 Parent(s): 76760b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -23
app.py CHANGED
@@ -111,30 +111,32 @@ start_work = """async() => {
111
  return false;
112
  }"""
113
 
114
- with gr.Blocks(title='Text to Image') as demo:
115
- with gr.Group(elem_id="page_1", visible=True) as page_1:
116
- with gr.Box():
117
- with gr.Row():
118
- start_button = gr.Button("Let's GO!", elem_id="start-btn", visible=True)
119
- start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
120
 
121
- with gr.Group(elem_id="page_2", visible=False) as page_2:
122
- chatbot = gr.Chatbot(elem_id="chat_bot").style(color_map=("green", "gray"))
123
- chat_demo = gr.Interface(
124
- chat,
125
- ["text", "state"],
126
- [chatbot, "state"],
127
- allow_flagging="never",
128
- show_label=False,
129
- )
130
 
131
- # chatbot = gr.Chatbot().style(color_map=("green", "gray"))
132
- # demo = gr.Interface(
133
- # chat,
134
- # ["text", "state"],
135
- # [chatbot, "state"],
136
- # allow_flagging="never",
137
- # show_label=False,
138
- # )
 
 
139
 
140
  demo.launch(debug = True)
 
111
  return false;
112
  }"""
113
 
114
+ # with gr.Blocks(title='Text to Image') as demo:
115
+ # with gr.Group(elem_id="page_1", visible=True) as page_1:
116
+ # with gr.Box():
117
+ # with gr.Row():
118
+ # start_button = gr.Button("Let's GO!", elem_id="start-btn", visible=True)
119
+ # start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
120
 
121
+ # with gr.Group(elem_id="page_2", visible=False) as page_2:
122
+ # chatbot = gr.Chatbot(elem_id="chat_bot").style(color_map=("green", "gray"))
123
+ # chat_demo = gr.Interface(
124
+ # chat,
125
+ # ["text", "state"],
126
+ # [chatbot, "state"],
127
+ # allow_flagging="never",
128
+ # show_label=False,
129
+ # )
130
 
131
+ chatbot = gr.Chatbot().style(color_map=("green", "gray"))
132
+ chatbot.change(show_progress=False)
133
+
134
+ demo = gr.Interface(
135
+ chat,
136
+ ["text", "state"],
137
+ [chatbot, "state"],
138
+ allow_flagging="never",
139
+ show_label=False,
140
+ )
141
 
142
  demo.launch(debug = True)