Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ def get_file_path(question: str) -> str:
|
|
| 48 |
|
| 49 |
def get_ref_content(path: str) -> str | object:
|
| 50 |
"""Retrieves content from the reference path provided."""
|
| 51 |
-
if path.endswith('mp3') or
|
| 52 |
file = librosa.load(path)
|
| 53 |
elif path.endswith('.xlsx') or path.endswith('.xls'):
|
| 54 |
file = pd.read_excel(path).to_json()
|
|
|
|
| 48 |
|
| 49 |
def get_ref_content(path: str) -> str | object:
|
| 50 |
"""Retrieves content from the reference path provided."""
|
| 51 |
+
if path.endswith('mp3') or path.startswith('https://www.youtube.com/'):
|
| 52 |
file = librosa.load(path)
|
| 53 |
elif path.endswith('.xlsx') or path.endswith('.xls'):
|
| 54 |
file = pd.read_excel(path).to_json()
|