Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,7 +62,6 @@ def download_file(filename):
|
|
| 62 |
if not os.path.exists(src_path):
|
| 63 |
return None
|
| 64 |
|
| 65 |
-
# ูุณุฎ ุงูู
ูู ุฅูู ู
ุฌูุฏ ูู
ูู ุชุญู
ููู ู
ู Gradio
|
| 66 |
with open(src_path, "rb") as src, open(dst_path, "wb") as dst:
|
| 67 |
dst.write(src.read())
|
| 68 |
|
|
@@ -100,6 +99,12 @@ with gr.Blocks(title="VRP Solver Interface") as demo:
|
|
| 100 |
status_model = gr.Textbox(label="model_state_dict.pt status", interactive=False)
|
| 101 |
file_model.change(fn=lambda f: upload_specific_file(f, "model_state_dict.pt"), inputs=file_model, outputs=status_model)
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
infer_btn = gr.Button("Run Inference")
|
| 104 |
infer_output = gr.Textbox(label="Inference Output", lines=15)
|
| 105 |
infer_btn.click(fn=run_inference, outputs=infer_output)
|
|
|
|
| 62 |
if not os.path.exists(src_path):
|
| 63 |
return None
|
| 64 |
|
|
|
|
| 65 |
with open(src_path, "rb") as src, open(dst_path, "wb") as dst:
|
| 66 |
dst.write(src.read())
|
| 67 |
|
|
|
|
| 99 |
status_model = gr.Textbox(label="model_state_dict.pt status", interactive=False)
|
| 100 |
file_model.change(fn=lambda f: upload_specific_file(f, "model_state_dict.pt"), inputs=file_model, outputs=status_model)
|
| 101 |
|
| 102 |
+
with gr.Row():
|
| 103 |
+
gr.Markdown("**orders.csv (inference data)**")
|
| 104 |
+
file_orders = gr.File()
|
| 105 |
+
status_orders = gr.Textbox(label="orders.csv status", interactive=False)
|
| 106 |
+
file_orders.change(fn=lambda f: upload_specific_file(f, "orders.csv"), inputs=file_orders, outputs=status_orders)
|
| 107 |
+
|
| 108 |
infer_btn = gr.Button("Run Inference")
|
| 109 |
infer_output = gr.Textbox(label="Inference Output", lines=15)
|
| 110 |
infer_btn.click(fn=run_inference, outputs=infer_output)
|