Spaces:
Runtime error
Runtime error
Commit
·
9f3d0ce
1
Parent(s):
dacba75
Update app.py
Browse files
app.py
CHANGED
@@ -41,10 +41,35 @@ with gr.Blocks() as demo:
|
|
41 |
model to read academic papers in PDF format locally. You can use it to help you summarize papers,
|
42 |
create presentation slides, or simply fulfill tasks assigned by your supervisor.\n
|
43 |
[Github](https://github.com/talkingwallace/ChatGPT-Paper-Reader)""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
app = GUI()
|
46 |
upload_button.click(fn=app.analyse, inputs=[api_input, pdf_input], outputs=result)
|
47 |
ask_button.click(app.ask_question, inputs=question_input, outputs=answer)
|
|
|
48 |
|
49 |
if __name__ == "__main__":
|
50 |
demo.title = "CHATGPT-PAPER-READER"
|
|
|
41 |
model to read academic papers in PDF format locally. You can use it to help you summarize papers,
|
42 |
create presentation slides, or simply fulfill tasks assigned by your supervisor.\n
|
43 |
[Github](https://github.com/talkingwallace/ChatGPT-Paper-Reader)""")
|
44 |
+
with open("./1001epochs.png", "rb") as f:
|
45 |
+
image_data = f.read()
|
46 |
+
image_base64 = base64.b64encode(image_data).decode("utf-8")
|
47 |
+
|
48 |
+
title = f"""
|
49 |
+
<h2 style="background-image: linear-gradient(to right, #3A5FCD, #87CEFA); -webkit-background-clip: text;
|
50 |
+
-webkit-text-fill-color: transparent; text-align: center;">
|
51 |
+
Speech Emotion Recognition
|
52 |
+
</h2>
|
53 |
+
"""
|
54 |
+
|
55 |
+
description = f"""
|
56 |
+
<div style="display: flex; align-items: center; justify-content: center; flex-direction: column;">
|
57 |
+
<p style="font-size: 18px; color: #4AAAFF; text-align: center;">
|
58 |
+
Extract the emotion and tone, Simply upload the audio or text!
|
59 |
+
</p>
|
60 |
+
<div style="display: flex; align-items: center; margin-bottom: 0px;">
|
61 |
+
<img src='data:image/jpeg;base64,{image_base64}' width='50' height='30' style="margin-right: 5px;"/>
|
62 |
+
<p style="font-size: 14px; color: #555;">
|
63 |
+
Disclaimer: This web app is for demonstration purposes only and not intended for commercial use. Contact: [email protected] for full solution.
|
64 |
+
</p>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
"""
|
68 |
|
69 |
app = GUI()
|
70 |
upload_button.click(fn=app.analyse, inputs=[api_input, pdf_input], outputs=result)
|
71 |
ask_button.click(app.ask_question, inputs=question_input, outputs=answer)
|
72 |
+
|
73 |
|
74 |
if __name__ == "__main__":
|
75 |
demo.title = "CHATGPT-PAPER-READER"
|