File size: 348 Bytes
cc0c4d2
 
dddecfd
cc0c4d2
 
d797103
cc0c4d2
 
 
 
 
 
6a32290
 
cc0c4d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
from question_extractor import hf_predict  # from your file

def predict(file):
    return hf_predict(file)

iface = gr.Interface(
    fn=predict,
    inputs=gr.File(type="filepath", label="file"),  # label must be "file"
    outputs="text",
    title="Question Paper Extractor",
)

if __name__ == "__main__":
    iface.launch()