|
import gradio as gr |
|
|
|
|
|
def process_education(topic, test_solution, homework_file): |
|
|
|
|
|
|
|
pdf_view = "PDF for topic: " + topic |
|
test_result = "Test result based on solution: " + test_solution |
|
return pdf_view, test_result |
|
|
|
|
|
iface = gr.Interface( |
|
process_education, |
|
[ |
|
gr.inputs.Dropdown(['Topic 1', 'Topic 2', 'Topic 3'], label="Choose Topic"), |
|
gr.inputs.Textbox(lines=2, label="Solve the Test"), |
|
gr.inputs.File(label="Upload Homework") |
|
], |
|
[ |
|
gr.outputs.HTML(label="View PDF of Chosen Topic"), |
|
gr.outputs.Textbox(label="Your Test Result") |
|
] |
|
) |
|
|
|
|
|
|
|
|
|
|
|
iface.save_to_huggingface_space("YOUR_HUGGINGFACE_USERNAME/YOUR_SPACE_NAME") |