Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
@@ -49,7 +49,7 @@ def analyze_audio_file(path_file_audio: str, query: str) -> str:
|
|
49 |
str: The result of the analysis of audio.
|
50 |
"""
|
51 |
|
52 |
-
client = genai.Client(api_key=os.getenv("
|
53 |
|
54 |
myfile = client.files.upload(file=path_file_audio)
|
55 |
|
@@ -73,7 +73,7 @@ def analyze_youtube_video(url_youtube_video: str, query: str) -> str:
|
|
73 |
str: Result of the video analysis.
|
74 |
"""
|
75 |
|
76 |
-
client = genai.Client(api_key=os.getenv("
|
77 |
|
78 |
response = client.models.generate_content(
|
79 |
model=f"models/{os.getenv('GOOGLE_MODEL_ID')}",
|
@@ -101,7 +101,7 @@ def analyze_image_file(path_file_image: str, query: str) -> str:
|
|
101 |
str: The result of the analysis of audio.
|
102 |
"""
|
103 |
|
104 |
-
client = genai.Client(api_key=os.getenv("
|
105 |
|
106 |
myfile = client.files.upload(file=path_file_image)
|
107 |
|
|
|
49 |
str: The result of the analysis of audio.
|
50 |
"""
|
51 |
|
52 |
+
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
53 |
|
54 |
myfile = client.files.upload(file=path_file_audio)
|
55 |
|
|
|
73 |
str: Result of the video analysis.
|
74 |
"""
|
75 |
|
76 |
+
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
77 |
|
78 |
response = client.models.generate_content(
|
79 |
model=f"models/{os.getenv('GOOGLE_MODEL_ID')}",
|
|
|
101 |
str: The result of the analysis of audio.
|
102 |
"""
|
103 |
|
104 |
+
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
105 |
|
106 |
myfile = client.files.upload(file=path_file_image)
|
107 |
|