Spaces:
Sleeping
Sleeping
import gradio as gr | |
from predict import predict_transaction | |
def predict_ui(check_id, employee_id, total, discount_amount, item_count, time, terminal_id): | |
return predict_transaction({ | |
"check_id": check_id, | |
"employee_id": employee_id, | |
"total": total, | |
"discount_amount": discount_amount, | |
"item_count": item_count, | |
"time": time, | |
"terminal_id": terminal_id | |
}) | |
demo = gr.Interface( | |
fn=predict_ui, | |
inputs=["number", "text", "number", "number", "number", "text", "text"], | |
outputs="text", | |
title="Suspicious Transaction Detector" | |
) | |
demo.launch() | |