Update app.py
Browse files
app.py
CHANGED
|
@@ -19,6 +19,8 @@ from dash.exceptions import PreventUpdate
|
|
| 19 |
import base64
|
| 20 |
import threading
|
| 21 |
from pytube import YouTube
|
|
|
|
|
|
|
| 22 |
|
| 23 |
# Check if CUDA is available and set the device
|
| 24 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
@@ -217,4 +219,9 @@ def update_transcription(n_clicks, hf_token, url):
|
|
| 217 |
])
|
| 218 |
]), download_data
|
| 219 |
else:
|
| 220 |
-
return transcript, None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
import base64
|
| 20 |
import threading
|
| 21 |
from pytube import YouTube
|
| 22 |
+
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
|
| 23 |
+
|
| 24 |
|
| 25 |
# Check if CUDA is available and set the device
|
| 26 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 219 |
])
|
| 220 |
]), download_data
|
| 221 |
else:
|
| 222 |
+
return transcript, None
|
| 223 |
+
|
| 224 |
+
if __name__ == '__main__':
|
| 225 |
+
print("Starting the Dash application...")
|
| 226 |
+
app.run(debug=True, host='0.0.0.0', port=7860)
|
| 227 |
+
print("Dash application has finished running.")
|