aakash0563 commited on
Commit
17982b7
·
1 Parent(s): c60ab41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py CHANGED
@@ -2,6 +2,31 @@ import gradio as gr
2
 
3
  import upload_pdf
4
  import query
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
 
7
 
 
2
 
3
  import upload_pdf
4
  import query
5
+ import gradio as gr
6
+
7
+ def select_action(upload_pdf, query_question):
8
+ if upload_pdf:
9
+ # Implement code for handling PDF upload
10
+ return "PDF upload selected"
11
+ elif query_question:
12
+ # Implement code for handling question query
13
+ return "Question query selected"
14
+ else:
15
+ return "Please select at least one action."
16
+
17
+ iface = gr.Interface(
18
+ fn=select_action,
19
+ inputs=[
20
+ gr.Checkbox("Upload PDF"),
21
+ gr.Checkbox("Query the Question")
22
+ ],
23
+ outputs="textbox",
24
+ title="Select Actions with Checkboxes",
25
+ description="Choose either to upload a PDF or query a question."
26
+ )
27
+
28
+ iface.launch()
29
+
30
 
31
 
32