Spaces:
Sleeping
Sleeping
Alexandre Gazola
commited on
Commit
·
e4cbe9d
1
Parent(s):
764f621
test
Browse files- app.py +3 -3
- constants.py +2 -5
app.py
CHANGED
@@ -59,7 +59,7 @@ class LangChainAgent:
|
|
59 |
download_file_as_base64
|
60 |
|
61 |
print("Waiting 60s before answering")
|
62 |
-
time.sleep(
|
63 |
|
64 |
result = self.executor.invoke({
|
65 |
"input": question,
|
@@ -137,8 +137,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
137 |
try:
|
138 |
file_name = item.get("file_name")
|
139 |
#provisorio
|
140 |
-
if not file_name and "bird" not in question_text:
|
141 |
-
|
142 |
question_text_for_agent = question_text
|
143 |
if file_name:
|
144 |
print(f"The following question has attatched file: {question_text[:50]}")
|
|
|
59 |
download_file_as_base64
|
60 |
|
61 |
print("Waiting 60s before answering")
|
62 |
+
time.sleep(10) # Delay for 60 seconds
|
63 |
|
64 |
result = self.executor.invoke({
|
65 |
"input": question,
|
|
|
137 |
try:
|
138 |
file_name = item.get("file_name")
|
139 |
#provisorio
|
140 |
+
#if not file_name and "bird" not in question_text:
|
141 |
+
# continue
|
142 |
question_text_for_agent = question_text
|
143 |
if file_name:
|
144 |
print(f"The following question has attatched file: {question_text[:50]}")
|
constants.py
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
import os
|
2 |
|
3 |
-
MODEL = 'gemini-2.0-flash'
|
4 |
-
|
5 |
# MODEL = 'gemini-2.5-pro-exp-03-25'
|
6 |
-
# 'gemini-2.5-pro-exp-03-25'
|
7 |
-
# gemini-2.0-flash
|
8 |
-
# gemini-2.5-pro-exp-03-25
|
9 |
|
10 |
API_KEY = os.getenv("GEMINI_API_KEY")
|
11 |
|
|
|
1 |
import os
|
2 |
|
3 |
+
# MODEL = 'gemini-2.0-flash'
|
4 |
+
MODEL = 'gemini-2.0-flash-exp'
|
5 |
# MODEL = 'gemini-2.5-pro-exp-03-25'
|
|
|
|
|
|
|
6 |
|
7 |
API_KEY = os.getenv("GEMINI_API_KEY")
|
8 |
|