Debugging app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,7 @@ def classify_fraud(customer_id, terminal_id, amount, timestamp):
|
|
| 16 |
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
|
| 17 |
outputs = model(**inputs)
|
| 18 |
pred = np.argmax(outputs.logits.detach().numpy(), axis=1)
|
|
|
|
| 19 |
return f"Prediction: {label_encoder.inverse_transform(pred)[0]}"
|
| 20 |
|
| 21 |
demo = gr.Interface(
|
|
|
|
| 16 |
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
|
| 17 |
outputs = model(**inputs)
|
| 18 |
pred = np.argmax(outputs.logits.detach().numpy(), axis=1)
|
| 19 |
+
print(pred)
|
| 20 |
return f"Prediction: {label_encoder.inverse_transform(pred)[0]}"
|
| 21 |
|
| 22 |
demo = gr.Interface(
|