Romain Fayoux
commited on
Commit
·
58f5703
1
Parent(s):
8ffc356
added flag to skip youtube
Browse files
app.py
CHANGED
|
@@ -90,8 +90,9 @@ def run_and_submit_all(profile: gr.OAuthProfile | None, limit: int | None):
|
|
| 90 |
# 3. Run your Agent
|
| 91 |
results_log = []
|
| 92 |
answers_payload = []
|
| 93 |
-
# Limit for test purposes
|
| 94 |
limit = 2
|
|
|
|
| 95 |
if limit is not None:
|
| 96 |
questions_data = questions_data[:limit]
|
| 97 |
# Run agents on questions fetched
|
|
@@ -111,7 +112,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None, limit: int | None):
|
|
| 111 |
if not task_id or question_text is None:
|
| 112 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 113 |
continue
|
| 114 |
-
if re.search("youtube", question_text, re.IGNORECASE):
|
| 115 |
print(f"Skipping item with youtube link: {item}")
|
| 116 |
continue
|
| 117 |
try:
|
|
|
|
| 90 |
# 3. Run your Agent
|
| 91 |
results_log = []
|
| 92 |
answers_payload = []
|
| 93 |
+
# Limit and skip youtube for test purposes
|
| 94 |
limit = 2
|
| 95 |
+
skip_youtube = True
|
| 96 |
if limit is not None:
|
| 97 |
questions_data = questions_data[:limit]
|
| 98 |
# Run agents on questions fetched
|
|
|
|
| 112 |
if not task_id or question_text is None:
|
| 113 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 114 |
continue
|
| 115 |
+
if re.search("youtube", question_text, re.IGNORECASE) and skip_youtube:
|
| 116 |
print(f"Skipping item with youtube link: {item}")
|
| 117 |
continue
|
| 118 |
try:
|