Update app.py
Browse files
app.py
CHANGED
|
@@ -5,14 +5,6 @@ import matplotlib.pyplot as plt
|
|
| 5 |
import seaborn as sns
|
| 6 |
from datetime import datetime
|
| 7 |
from sklearn.metrics import confusion_matrix, precision_score, recall_score
|
| 8 |
-
from PIL import Image
|
| 9 |
-
import requests
|
| 10 |
-
from io import BytesIO
|
| 11 |
-
|
| 12 |
-
# Load SabPaisa logo
|
| 13 |
-
logo_url = "https://huggingface.co/spaces/Abs6187/Fraud_Detection_API_excecute4/resolve/main/SabPaisa_logo.png"
|
| 14 |
-
response = requests.get(logo_url)
|
| 15 |
-
logo = Image.open(BytesIO(response.content))
|
| 16 |
|
| 17 |
# Sample data preparation
|
| 18 |
data = {
|
|
@@ -165,8 +157,6 @@ def update_interface(start_date, end_date, payer_id, payee_id, transaction_id, d
|
|
| 165 |
with gr.Blocks() as demo:
|
| 166 |
gr.Markdown("# Fraud Transaction Analysis Dashboard")
|
| 167 |
|
| 168 |
-
gr.Image(logo, show_label=False, width=200)
|
| 169 |
-
|
| 170 |
with gr.Row():
|
| 171 |
with gr.Column():
|
| 172 |
start_date = gr.Textbox(label="Start Date (YYYY-MM-DD)", value="2024-11-01")
|
|
|
|
| 5 |
import seaborn as sns
|
| 6 |
from datetime import datetime
|
| 7 |
from sklearn.metrics import confusion_matrix, precision_score, recall_score
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Sample data preparation
|
| 10 |
data = {
|
|
|
|
| 157 |
with gr.Blocks() as demo:
|
| 158 |
gr.Markdown("# Fraud Transaction Analysis Dashboard")
|
| 159 |
|
|
|
|
|
|
|
| 160 |
with gr.Row():
|
| 161 |
with gr.Column():
|
| 162 |
start_date = gr.Textbox(label="Start Date (YYYY-MM-DD)", value="2024-11-01")
|