oliverwang15 commited on
Commit
8a4c9d9
1 Parent(s): 9d0ee33
Files changed (1) hide show
  1. app.py +23 -29
app.py CHANGED
@@ -29,38 +29,32 @@ with gr.Blocks(theme="dark") as demo:
29
  <center> <h4> Please follow the Instruction <a href="https://huggingface.co/spaces/oliverwang15/DAN_AI/blob/main/README.md">HERE</a> </h4> </center>')
30
 
31
  with gr.Row():
32
- # Update
33
- # with gr.Group():
34
- # gr.Markdown(f'<center><h1>Input</h1></center>')
35
-
36
  with gr.Row():
37
- # Online
38
- with gr.Group():
39
- gr.Markdown(f'<center><h2>Request Online</h2></center>')
40
- # gr.Markdown(f'<center><p>Please First Upload the File</p></center>')
41
- with gr.Row():
42
- with gr.Group():
43
- openai_key = gr.Textbox(
44
- label='Enter your OpenAI API key here',
45
- type='password')
46
- with gr.Group():
47
- model_selection = gr.Radio(choices = ["ChatGPT", "GPT4"], label="Model Selection", info="Please select the model you want to use")
48
-
49
- file = gr.File(label='Upload your .txt or .pdf file here', file_types=['.txt', '.pdf'], file_count = 'multiple')
50
- btn_submit_txt_online = gr.Button(value='Submit')
51
- # btn_submit_txt.style(full_width=True)
52
-
53
- # Offline
54
  with gr.Group():
55
- gr.Markdown(f'<center><h2>Or Load Offline</h2></center>')
56
- questions = gr.CheckboxGroup(choices = QUESTIONS, value = QUESTIONS[:6], label="Questions (Please don't change this part now)", info="Please select the question you want to ask")
57
- answer_type = gr.Radio(choices = ["ChatGPT_txt", "GPT4_txt", 'New_GPT_4_pdf', 'Exp_training', 'Exp_Group_A', 'Exp_Group_B'], label="Answer_type", info="Please select the type of answer you want to show")
58
- btn_submit_txt_offline = gr.Button(value='Show Answers')
59
- # btn_submit_txt.style(full_width=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
- with gr.Row():
62
- with gr.Row():
63
-
64
  # Output
65
  with gr.Group():
66
  gr.Markdown(f'<center><h1>Output</h1></center>')
 
29
  <center> <h4> Please follow the Instruction <a href="https://huggingface.co/spaces/oliverwang15/DAN_AI/blob/main/README.md">HERE</a> </h4> </center>')
30
 
31
  with gr.Row():
 
 
 
 
32
  with gr.Row():
33
+
34
+ # Update
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  with gr.Group():
36
+ gr.Markdown(f'<center><h1>Input</h1></center>')
37
+ gr.Markdown(f'<center><p>Please First Upload the File</p></center>')
38
+
39
+ with gr.Group():
40
+ gr.Markdown(f'<center><h2>Request Online</h2></center>')
41
+ openai_key = gr.Textbox(
42
+ label='Enter your OpenAI API key here',
43
+ type='password')
44
+
45
+ model_selection = gr.Radio(choices = ["ChatGPT", "GPT4"], label="Model Selection", info="Please select the model you want to use")
46
+
47
+ file = gr.File(label='Upload your .txt or .pdf file here', file_types=['.txt', '.pdf'], file_count = 'multiple')
48
+ btn_submit_txt_online = gr.Button(value='Submit')
49
+ # btn_submit_txt.style(full_width=True)
50
+
51
+ with gr.Group():
52
+ gr.Markdown(f'<center><h2>Or Load Offline</h2></center>')
53
+ questions = gr.CheckboxGroup(choices = QUESTIONS, value = QUESTIONS[:6], label="Questions (Please don't change this part now)", info="Please select the question you want to ask")
54
+ answer_type = gr.Radio(choices = ["ChatGPT_txt", "GPT4_txt", 'New_GPT_4_pdf', 'Exp_training', 'Exp_Group_A', 'Exp_Group_B'], label="Answer_type", info="Please select the type of answer you want to show")
55
+ btn_submit_txt_offline = gr.Button(value='Show Answers')
56
+ # btn_submit_txt.style(full_width=True)
57
 
 
 
 
58
  # Output
59
  with gr.Group():
60
  gr.Markdown(f'<center><h1>Output</h1></center>')