junyangwang0410 commited on
Commit
64dfeeb
·
verified ·
1 Parent(s): 282e7e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -535,6 +535,7 @@ title_markdowm = ("""# PC-Agent: A Hierarchical Multi-Agent Collaboration Framew
535
 
536
  instruction_input = gr.Textbox(label="Instruction", placeholder="Input your instruction")
537
  knowledge_input = gr.Textbox(label="Knowledge", placeholder="Input your knowledge")
 
538
  with gr.Blocks() as demo:
539
  history_state = gr.State(value={})
540
  history_output = gr.State(value=[])
@@ -543,7 +544,7 @@ with gr.Blocks() as demo:
543
  with gr.Row():
544
  with gr.Column(scale=5):
545
  gr.Markdown(tos_markdown)
546
- image_input = gr.Image(label="Screenshot", type="pil", height=350, width=700)
547
  gr.Examples(examples=[
548
  ["./example/1-1.jpg", "Search for Alibaba's stock price in Chrome", "The Chrome search bar is in the middle of the screen and has \"在Google 中搜索,或输入网址\" written on it."],
549
  ["./example/1-2.jpg", "Search for Alibaba's stock price in Chrome", "The Chrome search bar is in the middle of the screen and has \"在Google 中搜索,或输入网址\" written on it."],
@@ -570,4 +571,4 @@ with gr.Blocks() as demo:
570
  outputs=[instruction_input, knowledge_input, output_component, history_state, history_output]
571
  )
572
 
573
- demo.queue().launch(share=True)
 
535
 
536
  instruction_input = gr.Textbox(label="Instruction", placeholder="Input your instruction")
537
  knowledge_input = gr.Textbox(label="Knowledge", placeholder="Input your knowledge")
538
+ image_input = gr.Image(label="Screenshot", type="pil", height=350, width=700)
539
  with gr.Blocks() as demo:
540
  history_state = gr.State(value={})
541
  history_output = gr.State(value=[])
 
544
  with gr.Row():
545
  with gr.Column(scale=5):
546
  gr.Markdown(tos_markdown)
547
+ image_input.render()
548
  gr.Examples(examples=[
549
  ["./example/1-1.jpg", "Search for Alibaba's stock price in Chrome", "The Chrome search bar is in the middle of the screen and has \"在Google 中搜索,或输入网址\" written on it."],
550
  ["./example/1-2.jpg", "Search for Alibaba's stock price in Chrome", "The Chrome search bar is in the middle of the screen and has \"在Google 中搜索,或输入网址\" written on it."],
 
571
  outputs=[instruction_input, knowledge_input, output_component, history_state, history_output]
572
  )
573
 
574
+ demo.queue().launch(share=False)