bhuvan-2005 commited on
Commit
6a32290
·
verified ·
1 Parent(s): 004a1e0

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from question_extractor import hf_predict
3
+
4
+ def predict(file):
5
+ return hf_predict(file)
6
+
7
+ iface = gr.Interface(
8
+ fn=predict,
9
+ inputs=gr.File(type="filepath", label="file"),
10
+ outputs="text",
11
+ title="Question Paper Extractor",
12
+ description="Upload a question paper image or PDF and get extracted questions.",
13
+ )
14
+
15
+ if __name__ == "__main__":
16
+ iface.launch()