epochs-demos commited on
Commit
e197a87
·
1 Parent(s): 4944edf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -6,7 +6,7 @@ from gpt_reader.prompt import BASE_POINTS
6
  with open("./logo.png", "rb") as f:
7
  image_data = f.read()
8
  image_base64 = base64.b64encode(image_data).decode("utf-8")
9
-
10
  class GUI:
11
  def __init__(self):
12
  self.api_key = ""
@@ -23,21 +23,19 @@ class GUI:
23
 
24
 
25
  with gr.Blocks() as demo:
26
- gr.Image(image_base64, label="Logo")
27
- gr.Markdown(
28
- """
29
- # CHATGPT-PAPER-READER
30
- """)
31
 
32
  with gr.Tab("Upload PDF File"):
33
  pdf_input = gr.File(label="PDF File")
34
  api_input = gr.Textbox(label="OpenAI API Key")
35
  result = gr.Textbox(label="PDF Summary")
36
  upload_button = gr.Button("Start Analyse")
 
37
  with gr.Tab("Ask question about your PDF"):
38
  question_input = gr.Textbox(label="Your Question", placeholder="Authors of this paper?")
39
  answer = gr.Textbox(label="Answer")
40
  ask_button = gr.Button("Ask")
 
41
  with gr.Accordion("About this project"):
42
  gr.Markdown(
43
  """## CHATGPT-PAPER-READER📝
@@ -52,4 +50,4 @@ with gr.Blocks() as demo:
52
 
53
  if __name__ == "__main__":
54
  demo.title = "CHATGPT-PAPER-READER"
55
- demo.launch() # add "share=True" to share CHATGPT-PAPER-READER app on Internet.
 
6
  with open("./logo.png", "rb") as f:
7
  image_data = f.read()
8
  image_base64 = base64.b64encode(image_data).decode("utf-8")
9
+
10
  class GUI:
11
  def __init__(self):
12
  self.api_key = ""
 
23
 
24
 
25
  with gr.Blocks() as demo:
26
+ gr.Image(image_base64, label="Logo") # Display the logo image
 
 
 
 
27
 
28
  with gr.Tab("Upload PDF File"):
29
  pdf_input = gr.File(label="PDF File")
30
  api_input = gr.Textbox(label="OpenAI API Key")
31
  result = gr.Textbox(label="PDF Summary")
32
  upload_button = gr.Button("Start Analyse")
33
+
34
  with gr.Tab("Ask question about your PDF"):
35
  question_input = gr.Textbox(label="Your Question", placeholder="Authors of this paper?")
36
  answer = gr.Textbox(label="Answer")
37
  ask_button = gr.Button("Ask")
38
+
39
  with gr.Accordion("About this project"):
40
  gr.Markdown(
41
  """## CHATGPT-PAPER-READER📝
 
50
 
51
  if __name__ == "__main__":
52
  demo.title = "CHATGPT-PAPER-READER"
53
+ demo.launch()