Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -341,14 +341,14 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
341 |
prompt_input2 = gr.Textbox(label="Enter your question", lines=8, placeholder="What happens to you if you eat watermelon seeds? \n\n How long should you wait between eating a meal and going swimming? \n\n Are vampires real? \n\n Who is a famous person from the Galapagos Islands?\n\nHow were the sun and the stars created?")
|
342 |
|
343 |
with gr.Row():
|
344 |
-
|
345 |
|
346 |
with gr.Row():
|
347 |
Relevance = gr.Slider(1, 100, value=70, label="Relevance", info="Choose between 0 and 100", interactive=True)
|
348 |
Diversity = gr.Slider(1, 100, value=25, label="Diversity", info="Choose between 0 and 100", interactive=True)
|
349 |
|
350 |
with gr.Row():
|
351 |
-
|
352 |
|
353 |
with gr.Row():
|
354 |
submit_button = gr.Button("Submit", variant="primary")
|
@@ -356,7 +356,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
356 |
# Define the function to be executed when the submit button is pressed
|
357 |
submit_button.click(
|
358 |
fn=process_and_email,
|
359 |
-
inputs=[
|
360 |
outputs=[]
|
361 |
)
|
362 |
|
|
|
341 |
prompt_input2 = gr.Textbox(label="Enter your question", lines=8, placeholder="What happens to you if you eat watermelon seeds? \n\n How long should you wait between eating a meal and going swimming? \n\n Are vampires real? \n\n Who is a famous person from the Galapagos Islands?\n\nHow were the sun and the stars created?")
|
342 |
|
343 |
with gr.Row():
|
344 |
+
file = gr.File(file_types=["text"], file_count="multiple", label="Or You Can Click to Upload a File")
|
345 |
|
346 |
with gr.Row():
|
347 |
Relevance = gr.Slider(1, 100, value=70, label="Relevance", info="Choose between 0 and 100", interactive=True)
|
348 |
Diversity = gr.Slider(1, 100, value=25, label="Diversity", info="Choose between 0 and 100", interactive=True)
|
349 |
|
350 |
with gr.Row():
|
351 |
+
email = gr.Textbox(label="Enter your email address", placeholder="[email protected]")
|
352 |
|
353 |
with gr.Row():
|
354 |
submit_button = gr.Button("Submit", variant="primary")
|
|
|
356 |
# Define the function to be executed when the submit button is pressed
|
357 |
submit_button.click(
|
358 |
fn=process_and_email,
|
359 |
+
inputs=[file, email],
|
360 |
outputs=[]
|
361 |
)
|
362 |
|