Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,14 @@ from tools.final_answer import FinalAnswerTool
|
|
| 7 |
from tools.transcription_tool import YoutubeTranscriptions
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
|
|
|
|
|
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
|
|
| 7 |
from tools.transcription_tool import YoutubeTranscriptions
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
+
import os
|
| 11 |
+
from huggingface_hub import login
|
| 12 |
|
| 13 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 14 |
+
if hf_token:
|
| 15 |
+
login(hf_token) # Authenticate with Hugging Face
|
| 16 |
+
else:
|
| 17 |
+
print("Error: Hugging Face API token is missing!")
|
| 18 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 19 |
@tool
|
| 20 |
def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|