Spaces:
Runtime error
Runtime error
Commit
·
b39fcd0
1
Parent(s):
a8216e3
Update app.py
Browse files
app.py
CHANGED
@@ -20,25 +20,6 @@ class GUI:
|
|
20 |
|
21 |
|
22 |
with gr.Blocks() as demo:
|
23 |
-
gr.Markdown(
|
24 |
-
"""
|
25 |
-
# CHATGPT-PAPER-READER
|
26 |
-
""")
|
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 |
-
with gr.Tab("Ask question about your PDF"):
|
34 |
-
question_input = gr.Textbox(label="Your Question", placeholder="Authors of this paper?")
|
35 |
-
answer = gr.Textbox(label="Answer")
|
36 |
-
ask_button = gr.Button("Ask")
|
37 |
-
with gr.Accordion("About this project"):
|
38 |
-
gr.Markdown(
|
39 |
-
"""style="background-image: linear-gradient(to right, #3A5FCD, #87CEFA); -webkit-background-clip: text;
|
40 |
-
-webkit-text-fill-color: transparent; text-align: center;">
|
41 |
-
Speech Emotion Recognition""")
|
42 |
with open("./logo.png", "rb") as f:
|
43 |
image_data = f.read()
|
44 |
image_base64 = base64.b64encode(image_data).decode("utf-8")
|
@@ -63,6 +44,26 @@ with gr.Blocks() as demo:
|
|
63 |
</div>
|
64 |
</div>
|
65 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
app = GUI()
|
68 |
upload_button.click(fn=app.analyse, inputs=[api_input, pdf_input], outputs=result)
|
|
|
20 |
|
21 |
|
22 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
with open("./logo.png", "rb") as f:
|
24 |
image_data = f.read()
|
25 |
image_base64 = base64.b64encode(image_data).decode("utf-8")
|
|
|
44 |
</div>
|
45 |
</div>
|
46 |
"""
|
47 |
+
gr.title(title)
|
48 |
+
|
49 |
+
|
50 |
+
with gr.Tab("Upload PDF File"):
|
51 |
+
pdf_input = gr.File(label="PDF File")
|
52 |
+
api_input = gr.Textbox(label="OpenAI API Key")
|
53 |
+
result = gr.Textbox(label="PDF Summary")
|
54 |
+
upload_button = gr.Button("Start Analyse")
|
55 |
+
with gr.Tab("Ask question about your PDF"):
|
56 |
+
question_input = gr.Textbox(label="Your Question", placeholder="Authors of this paper?")
|
57 |
+
answer = gr.Textbox(label="Answer")
|
58 |
+
ask_button = gr.Button("Ask")
|
59 |
+
with gr.Accordion("About this project"):
|
60 |
+
gr.Markdown(
|
61 |
+
"""## CHATGPT-PAPER-READER📝
|
62 |
+
This repository provides a simple interface that utilizes the gpt-3.5-turbo
|
63 |
+
model to read academic papers in PDF format locally. You can use it to help you summarize papers,
|
64 |
+
create presentation slides, or simply fulfill tasks assigned by your supervisor.\n
|
65 |
+
[Github](https://github.com/talkingwallace/ChatGPT-Paper-Reader)""")
|
66 |
+
|
67 |
|
68 |
app = GUI()
|
69 |
upload_button.click(fn=app.analyse, inputs=[api_input, pdf_input], outputs=result)
|