Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import query | |
| import upload_pdf | |
| import gradio as gr | |
| def select_action(upload_pdf, query_question): | |
| if upload_pdf: | |
| # Implement code for handling PDF upload | |
| return "PDF upload selected" | |
| elif query_question: | |
| # Implement code for handling question query | |
| return "Question query selected" | |
| else: | |
| return "Please select at least one action." | |
| iface = gr.Interface( | |
| fn=select_action, | |
| inputs=[ | |
| gr.Checkbox("Upload PDF"), | |
| gr.Checkbox("Query the Question") | |
| ], | |
| outputs="textbox", | |
| title="Select Actions with Checkboxes", | |
| description="Choose either to upload a PDF or query a question." | |
| ) | |
| iface.launch() | |