File size: 619 Bytes
76c9d7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()