Spaces:
Sleeping
Sleeping
noumanjavaid
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from datasets import load_dataset, Audio
|
3 |
from transformers import AutoModelForAudioClassification, AutoFeatureExtractor
|
4 |
import torch
|
5 |
-
|
|
|
6 |
|
7 |
# Load the MInDS-14 dataset
|
8 |
dataset = load_dataset("PolyAI/minds14", "en-US", split="train", trust_remote_code=True)
|
|
|
1 |
+
os.system("apt-get update")
|
2 |
+
os.system("apt-get install -y python3-pip") # Make sure pip is available
|
3 |
+
os.system("pip install transformers")
|
4 |
+
|
5 |
+
# Restart the kernel here if you have the option (in a notebook setting)
|
6 |
+
import transformers
|
7 |
+
from torch.utils.data import DataLoader
|
8 |
+
|
9 |
+
|
10 |
import streamlit as st
|
11 |
from datasets import load_dataset, Audio
|
12 |
from transformers import AutoModelForAudioClassification, AutoFeatureExtractor
|
13 |
import torch
|
14 |
+
import os
|
15 |
+
# Install using apt
|
16 |
|
17 |
# Load the MInDS-14 dataset
|
18 |
dataset = load_dataset("PolyAI/minds14", "en-US", split="train", trust_remote_code=True)
|