Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
-
import torch
|
3 |
-
from transformers import pipeline
|
4 |
-
|
5 |
-
|
6 |
import os
|
|
|
|
|
|
|
7 |
os.system("pip install torch")
|
|
|
|
|
|
|
|
|
8 |
|
9 |
# Initialize the ASR pipeline for Bulgarian
|
10 |
asr_pipeline = pipeline("automatic-speech-recognition", model="infinitejoy/wav2vec2-large-xls-r-300m-bulgarian")
|
@@ -26,5 +29,4 @@ iface = gr.Interface(
|
|
26 |
|
27 |
# ์ธํฐํ์ด์ค ์คํ
|
28 |
if __name__ == "__main__":
|
29 |
-
iface.launch()
|
30 |
-
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
2 |
import os
|
3 |
+
import time # To add a short delay
|
4 |
+
|
5 |
+
# Force install torch (though this should ideally be handled in requirements.txt)
|
6 |
os.system("pip install torch")
|
7 |
+
time.sleep(10) # Adding a short delay to ensure installation completes
|
8 |
+
|
9 |
+
import torch
|
10 |
+
from transformers import pipeline
|
11 |
|
12 |
# Initialize the ASR pipeline for Bulgarian
|
13 |
asr_pipeline = pipeline("automatic-speech-recognition", model="infinitejoy/wav2vec2-large-xls-r-300m-bulgarian")
|
|
|
29 |
|
30 |
# ์ธํฐํ์ด์ค ์คํ
|
31 |
if __name__ == "__main__":
|
32 |
+
iface.launch()
|
|