Kexin2000 commited on
Commit
98e951a
·
verified ·
1 Parent(s): 0cda9f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -378,23 +378,16 @@ interface_1 = gr.Interface(
378
 
379
  # 创建第二个界面
380
  interface_2 = gr.Interface(
381
- question_answer,
382
- [
383
- gr.Chatbot(placeholder_text="Chat History", label="Chat History", lines=50, elem_id="chatbot"),
384
  gr.Textbox(label='Enter PDF URL here (Example: https://arxiv.org/pdf/1706.03762.pdf )'),
385
  gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf']),
386
  gr.Textbox(label='Enter your question here'),
387
  gr.Textbox(label='Enter your OpenAI API key here', password=True),
388
- gr.Radio(['gpt-3.5-turbo',
389
- 'gpt-3.5-turbo-16k',
390
- 'gpt-3.5-turbo-0613',
391
- 'gpt-3.5-turbo-16k-0613',
392
- 'text-davinci-003',
393
- 'gpt-4',
394
- 'gpt-4-32k'
395
- ], label='Select Model', default='gpt-3.5-turbo'),
396
  ],
397
- [gr.Chatbot(placeholder="Chat History", label="Chat History", lines=50, elem_id="chatbot")],
398
  examples=[],
399
  title=title_2,
400
  description=description_2,
 
378
 
379
  # 创建第二个界面
380
  interface_2 = gr.Interface(
381
+ fn=question_answer,
382
+ inputs=[
383
+ gr.Chatbot(placeholder="Chat History", label="Chat History", lines=50, elem_id="chatbot"),
384
  gr.Textbox(label='Enter PDF URL here (Example: https://arxiv.org/pdf/1706.03762.pdf )'),
385
  gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf']),
386
  gr.Textbox(label='Enter your question here'),
387
  gr.Textbox(label='Enter your OpenAI API key here', password=True),
388
+ gr.Radio(['gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-3.5-turbo-0613', 'gpt-3.5-turbo-16k-0613', 'text-davinci-003', 'gpt-4', 'gpt-4-32k'], label='Select Model', default='gpt-3.5-turbo'),
 
 
 
 
 
 
 
389
  ],
390
+ outputs=[gr.Chatbot(placeholder="Chat History", label="Chat History", lines=50, elem_id="chatbot")],
391
  examples=[],
392
  title=title_2,
393
  description=description_2,