Update app.py
Browse files
app.py
CHANGED
@@ -458,26 +458,26 @@ def extract_eval(image1,image2,image3,image4):
|
|
458 |
|
459 |
|
460 |
|
461 |
-
|
462 |
-
#
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
def preview(files, sd: gr.SelectData):
|
469 |
-
|
470 |
-
|
471 |
-
with gr.Blocks() as demo:
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
|
480 |
-
|
481 |
-
|
482 |
|
483 |
-
demo.launch()
|
|
|
458 |
|
459 |
|
460 |
|
461 |
+
iface = gr.Interface(fn=extract_eval,
|
462 |
+
#inputs=[gr.Image(label='Ideal Answer'),gr.Image(label='Ideal Answer Diagram'),gr.Image(label='Submitted Answer'),gr.Image(label='Submitted Answer Diagram')],
|
463 |
+
inputs=gr.inputs.File(file_count="directory"),
|
464 |
+
outputs=gr.outputs.Textbox(),)
|
465 |
+
|
466 |
+
iface.launch(enable_queue=True)
|
467 |
+
|
468 |
+
# def preview(files, sd: gr.SelectData):
|
469 |
+
# return files[sd.index].name
|
470 |
+
|
471 |
+
# with gr.Blocks() as demo:
|
472 |
+
# with gr.Row():
|
473 |
+
# with gr.Column():
|
474 |
+
# f = gr.File(file_types=["image"], file_count="multiple")
|
475 |
+
# i = gr.Image()
|
476 |
+
# btn = gr.Button()
|
477 |
+
# with gr.Column():
|
478 |
+
# o = gr.Image()
|
479 |
|
480 |
+
# f.select(preview, f, i)
|
481 |
+
# btn.click(lambda x:x, i, o)
|
482 |
|
483 |
+
# demo.launch()
|