jeremierostan commited on
Commit
b1e005f
1 Parent(s): 62c9bad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -87,12 +87,12 @@ def handle_answer_submission(api_key, pdf_file, answer1, answer2, answer3, answe
87
  # Gradio Blocks for the App
88
  with gr.Blocks() as app:
89
  with gr.Row():
90
- # Add Seshat logo
91
  logo_url = "https://i.ibb.co/S7DCk3K/a-logo-design-with-a-stylized-egyptian-scribe-the-i-L59-Gh-Zn-QASp7v-TUazjdp-A-1-s-Ip-Qq-VRIif-VF5dn.png" # Replace with your actual logo URL
92
  gr.Image(logo_url, label="", show_label=False, height=200)
93
 
94
- # Place the API key input at the top
95
- api_key_input = gr.Textbox(label="Enter your Groq API Key", placeholder="Your Groq API Key here...", type="password")
96
 
97
  # PDF upload Section
98
  pdf_file = gr.File(label="Upload PDF Paper")
@@ -114,7 +114,7 @@ with gr.Blocks() as app:
114
  # Output for result
115
  output = gr.Textbox(label="Result", interactive=False)
116
 
117
- # Layout: Upload button right under the file upload, followed by Q/A section
118
  upload_btn.click(fn=handle_pdf_upload, inputs=[api_key_input, pdf_file], outputs=[question1, question2, question3, question4])
119
  submit_btn = gr.Button("Submit Answers")
120
  # Passing answers individually
 
87
  # Gradio Blocks for the App
88
  with gr.Blocks() as app:
89
  with gr.Row():
90
+ # Seshat logo
91
  logo_url = "https://i.ibb.co/S7DCk3K/a-logo-design-with-a-stylized-egyptian-scribe-the-i-L59-Gh-Zn-QASp7v-TUazjdp-A-1-s-Ip-Qq-VRIif-VF5dn.png" # Replace with your actual logo URL
92
  gr.Image(logo_url, label="", show_label=False, height=200)
93
 
94
+ # User input Groq API key
95
+ api_key_input = gr.Textbox(label="Enter your Groq API Key", placeholder="Create a free key at https://console.groq.com/keys", type="password")
96
 
97
  # PDF upload Section
98
  pdf_file = gr.File(label="Upload PDF Paper")
 
114
  # Output for result
115
  output = gr.Textbox(label="Result", interactive=False)
116
 
117
+ # Upload button
118
  upload_btn.click(fn=handle_pdf_upload, inputs=[api_key_input, pdf_file], outputs=[question1, question2, question3, question4])
119
  submit_btn = gr.Button("Submit Answers")
120
  # Passing answers individually