yizhangliu commited on
Commit
94e1353
1 Parent(s): 857a68d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -24
app.py CHANGED
@@ -111,32 +111,38 @@ 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
- 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)
 
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
+ chatbot.change(chat,
124
+ ["text", "state"],
125
+ [chatbot, "state"],
126
+ allow_flagging="never",
127
+ show_label=False,
128
+ show_progress=False)
129
+ # chat_demo = gr.Interface(
130
+ # chat,
131
+ # ["text", "state"],
132
+ # [chatbot, "state"],
133
+ # allow_flagging="never",
134
+ # show_label=False,
135
+ # )
136
 
137
+ # chatbot = gr.Chatbot().style(color_map=("green", "gray"))
138
+ # chatbot.change(show_progress=False)
139
 
140
+ # demo = gr.Interface(
141
+ # chat,
142
+ # ["text", "state"],
143
+ # [chatbot, "state"],
144
+ # allow_flagging="never",
145
+ # show_label=False,
146
+ # )
147
 
148
  demo.launch(debug = True)