Spaces:
Sleeping
Sleeping
Fix website transcription import
Browse files
app.py
CHANGED
|
@@ -8,9 +8,9 @@ from llama_index.core.agent.workflow import AgentWorkflow, ToolCallResult, Agent
|
|
| 8 |
from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
|
| 9 |
from tools import (
|
| 10 |
APIProcessor,
|
|
|
|
| 11 |
parse_youtube_video,
|
| 12 |
transcribe_image_from_url,
|
| 13 |
-
transcribe_webpage,
|
| 14 |
add_numbers,
|
| 15 |
)
|
| 16 |
from utils import format_final_answer
|
|
@@ -36,7 +36,7 @@ class BasicAgent:
|
|
| 36 |
async def __call__(self, question: str, task_id: str, file_name: str) -> str:
|
| 37 |
google_search = GoogleSearch().google_search
|
| 38 |
google_image_search = GoogleSearch().google_image_search
|
| 39 |
-
|
| 40 |
get_and_process_question_attachment = APIProcessor(
|
| 41 |
file_url=DEFAULT_API_URL + "/files/" + task_id, file_name=file_name
|
| 42 |
).get_and_process_attachment
|
|
|
|
| 8 |
from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
|
| 9 |
from tools import (
|
| 10 |
APIProcessor,
|
| 11 |
+
WebPageTranscription,
|
| 12 |
parse_youtube_video,
|
| 13 |
transcribe_image_from_url,
|
|
|
|
| 14 |
add_numbers,
|
| 15 |
)
|
| 16 |
from utils import format_final_answer
|
|
|
|
| 36 |
async def __call__(self, question: str, task_id: str, file_name: str) -> str:
|
| 37 |
google_search = GoogleSearch().google_search
|
| 38 |
google_image_search = GoogleSearch().google_image_search
|
| 39 |
+
transcribe_webpage = WebPageTranscription().transcribe_webpage
|
| 40 |
get_and_process_question_attachment = APIProcessor(
|
| 41 |
file_url=DEFAULT_API_URL + "/files/" + task_id, file_name=file_name
|
| 42 |
).get_and_process_attachment
|