Toumaima commited on
Commit
beb1edf
·
verified ·
1 Parent(s): 528154a

CORRECT IMPORT

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 ddg
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 = ddg(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:
 
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: