Spaces:
Sleeping
Sleeping
import gradio as gr | |
from main import flow | |
with gr.Blocks(theme= "JohnSmith9982/small_and_pretty") as demo: | |
with gr.Row(): | |
with gr.Column(): | |
student_pdf_path = gr.File(label="Student's PDF Response") | |
with gr.Column(): | |
standard_pdf_path = gr.File(label="Standard Answer Key PDF") | |
with gr.Row(): | |
submit_btn = gr.Button("Evaluate Exam") | |
with gr.Row(): | |
output = gr.File(label="Output PDF Path") | |
def evaluate_exam(student_pdf_path, standard_pdf_path): | |
save_dict = True | |
student_dict_path = "student_response.json" | |
standard_dict_path = "standard_key.json" | |
output_pdf_path = "output_report.pdf" | |
return flow(student_pdf_path, standard_pdf_path, save_dict, student_dict_path, standard_dict_path, output_pdf_path) | |
demo.launch(share=True, pwa=True, debug=True) |