Update app.py
Browse files
app.py
CHANGED
@@ -221,12 +221,10 @@ start_work = """async() => {
|
|
221 |
|
222 |
|
223 |
with gr.Blocks(title='Talk to chatGPT') as demo:
|
224 |
-
gr.HTML("<p>You can duplicating this space and use your own session token: <a style='display:inline-block' href='https://huggingface.co/spaces/yizhangliu/chatGPT?duplicate=true'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14' alt='Duplicate Space'></a></p>")
|
225 |
-
gr.HTML("<p> Instruction on how to get session token can be seen in video <a style='display:inline-block' href='https://www.youtube.com/watch?v=TdNSj_qgdFk'><font style='color:blue;weight:bold;'>here</font></a>. Add your session token by going to settings and add under secrets. </p>")
|
226 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
227 |
with gr.Box():
|
228 |
with gr.Row():
|
229 |
-
start_button = gr.Button("
|
230 |
start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
|
231 |
|
232 |
with gr.Group(elem_id="page_2", visible=False) as page_2:
|
@@ -237,7 +235,7 @@ with gr.Blocks(title='Talk to chatGPT') as demo:
|
|
237 |
prompt_input0 = gr.Textbox(lines=2, label="prompt",show_label=False)
|
238 |
prompt_input1 = gr.Textbox(lines=4, label="prompt", visible=False)
|
239 |
chat_history = gr.Textbox(lines=4, label="prompt", visible=False)
|
240 |
-
chat_radio = gr.Radio(["
|
241 |
submit_btn = gr.Button(value = "submit",elem_id="submit-btn").style(
|
242 |
margin=True,
|
243 |
rounded=(True, True, True, True),
|
|
|
221 |
|
222 |
|
223 |
with gr.Blocks(title='Talk to chatGPT') as demo:
|
|
|
|
|
224 |
with gr.Group(elem_id="page_1", visible=True) as page_1:
|
225 |
with gr.Box():
|
226 |
with gr.Row():
|
227 |
+
start_button = gr.Button("", elem_id="start-btn", visible=True)
|
228 |
start_button.click(fn=None, inputs=[], outputs=[], _js=start_work)
|
229 |
|
230 |
with gr.Group(elem_id="page_2", visible=False) as page_2:
|
|
|
235 |
prompt_input0 = gr.Textbox(lines=2, label="prompt",show_label=False)
|
236 |
prompt_input1 = gr.Textbox(lines=4, label="prompt", visible=False)
|
237 |
chat_history = gr.Textbox(lines=4, label="prompt", visible=False)
|
238 |
+
chat_radio = gr.Radio(["1", "2"], elem_id="chat_radio",value="Talk to chatGPT", show_label=False)
|
239 |
submit_btn = gr.Button(value = "submit",elem_id="submit-btn").style(
|
240 |
margin=True,
|
241 |
rounded=(True, True, True, True),
|