Spaces:
Sleeping
Sleeping
bug fix
Browse files
app.py
CHANGED
|
@@ -1,11 +1,16 @@
|
|
| 1 |
import os
|
| 2 |
import inspect
|
|
|
|
| 3 |
import tempfile
|
| 4 |
import requests
|
| 5 |
import gradio as gr
|
| 6 |
import pandas as pd
|
| 7 |
from agent import start_agent
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# (Keep Constants as is)
|
| 10 |
# --- Constants ---
|
| 11 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 1 |
import os
|
| 2 |
import inspect
|
| 3 |
+
import urllib3
|
| 4 |
import tempfile
|
| 5 |
import requests
|
| 6 |
import gradio as gr
|
| 7 |
import pandas as pd
|
| 8 |
from agent import start_agent
|
| 9 |
|
| 10 |
+
|
| 11 |
+
urllib3.disable_warnings()
|
| 12 |
+
|
| 13 |
+
|
| 14 |
# (Keep Constants as is)
|
| 15 |
# --- Constants ---
|
| 16 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
tools.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import base64
|
|
|
|
| 3 |
import requests
|
| 4 |
import tempfile
|
| 5 |
import pandas as pd
|
|
@@ -8,6 +9,9 @@ from pytubefix import YouTube
|
|
| 8 |
from langchain_community.tools import tool
|
| 9 |
from bs4 import BeautifulSoup, ResultSet, PageElement, Tag, NavigableString
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
@tool
|
| 12 |
def default_file_reader(file_path: str) -> str | None:
|
| 13 |
"""
|
|
|
|
| 1 |
import os
|
| 2 |
import base64
|
| 3 |
+
import urllib3
|
| 4 |
import requests
|
| 5 |
import tempfile
|
| 6 |
import pandas as pd
|
|
|
|
| 9 |
from langchain_community.tools import tool
|
| 10 |
from bs4 import BeautifulSoup, ResultSet, PageElement, Tag, NavigableString
|
| 11 |
|
| 12 |
+
urllib3.disable_warnings()
|
| 13 |
+
|
| 14 |
+
|
| 15 |
@tool
|
| 16 |
def default_file_reader(file_path: str) -> str | None:
|
| 17 |
"""
|