Spaces:
Sleeping
Sleeping
Marcos12886
commited on
Commit
·
3cfdee5
1
Parent(s):
8fc46e5
Usar ruta en local
Browse files
app.py
CHANGED
@@ -3,12 +3,10 @@ import torch
|
|
3 |
import gradio as gr
|
4 |
from huggingface_hub import InferenceClient
|
5 |
from model import model_params, AudioDataset
|
6 |
-
from datasets import load_dataset
|
7 |
|
8 |
-
|
9 |
# dataset_path = "data/mixed_data_nuevo" # PARA CLASIFICADOR
|
10 |
token = os.getenv("HF_TOKEN")
|
11 |
-
dataset_path = load_dataset("A-POR-LOS-8000/baby_cry_detection") # PARA MONITOR
|
12 |
model, _, _, id2label = model_params(dataset_path)
|
13 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")# Usar a GPU o CPU
|
14 |
model.to(device)# Usar a GPU o CPU
|
|
|
3 |
import gradio as gr
|
4 |
from huggingface_hub import InferenceClient
|
5 |
from model import model_params, AudioDataset
|
|
|
6 |
|
7 |
+
dataset_path = "data/baby_cry_detection" # PARA MONITOR
|
8 |
# dataset_path = "data/mixed_data_nuevo" # PARA CLASIFICADOR
|
9 |
token = os.getenv("HF_TOKEN")
|
|
|
10 |
model, _, _, id2label = model_params(dataset_path)
|
11 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")# Usar a GPU o CPU
|
12 |
model.to(device)# Usar a GPU o CPU
|