Spaces:
Runtime error
Runtime error
CORRECT IMPORT
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
import whisper
|
| 5 |
import gradio as gr
|
| 6 |
import pandas as pd
|
| 7 |
-
from duckduckgo_search import
|
| 8 |
from transformers import pipeline
|
| 9 |
|
| 10 |
# --- Constants ---
|
|
@@ -30,7 +30,7 @@ class BasicAgent:
|
|
| 30 |
|
| 31 |
def search(self, question: str) -> str:
|
| 32 |
# Perform a DuckDuckGo search for an answer to the question
|
| 33 |
-
search_results =
|
| 34 |
return search_results[0]["body"] if search_results else "No relevant search results found."
|
| 35 |
|
| 36 |
def __call__(self, question: str, video_path: str = None) -> str:
|
|
|
|
| 4 |
import whisper
|
| 5 |
import gradio as gr
|
| 6 |
import pandas as pd
|
| 7 |
+
from duckduckgo_search import DDGS
|
| 8 |
from transformers import pipeline
|
| 9 |
|
| 10 |
# --- Constants ---
|
|
|
|
| 30 |
|
| 31 |
def search(self, question: str) -> str:
|
| 32 |
# Perform a DuckDuckGo search for an answer to the question
|
| 33 |
+
search_results = DDGS(question)
|
| 34 |
return search_results[0]["body"] if search_results else "No relevant search results found."
|
| 35 |
|
| 36 |
def __call__(self, question: str, video_path: str = None) -> str:
|