Spaces:
Sleeping
Sleeping
minr fixes
Browse files
app.py
CHANGED
|
@@ -140,7 +140,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 140 |
"f918266a-b3e0-4914-865d-4faa564f1aef":"code.py",
|
| 141 |
"99c9cc74-fdc8-46c6-8f8d-3ce2d3bfeea3":"audio2.mp3",
|
| 142 |
"7bd855d8-463d-4ed5-93ca-5fe35145f733":"excel.xlsx"}
|
| 143 |
-
|
| 144 |
print(f"Running agent on {len(questions_data)} questions...")
|
| 145 |
for item in questions_data:
|
| 146 |
task_id = item.get("task_id")
|
|
@@ -150,7 +150,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 150 |
continue
|
| 151 |
try:
|
| 152 |
if task_id in tasks:
|
| 153 |
-
question_text = question_text + f"\n\nThis is the file path: {tasks[task_id]}"
|
| 154 |
submitted_answer = agent(question_text)
|
| 155 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
| 156 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
|
@@ -232,15 +232,18 @@ with gr.Blocks(title="TurboNerd Agent🤓") as demo:
|
|
| 232 |
question_input = gr.Textbox(
|
| 233 |
label="Ask a question",
|
| 234 |
placeholder="Type your question here...",
|
| 235 |
-
lines=
|
| 236 |
max_lines=5,
|
| 237 |
-
|
|
|
|
|
|
|
| 238 |
)
|
| 239 |
file_upload = gr.File(
|
| 240 |
label="Upload Files",
|
| 241 |
file_types=ALLOWED_FILE_EXTENSIONS,
|
| 242 |
file_count="multiple",
|
| 243 |
-
scale=1
|
|
|
|
| 244 |
)
|
| 245 |
with gr.Row():
|
| 246 |
submit_btn = gr.Button("Send", variant="primary")
|
|
|
|
| 140 |
"f918266a-b3e0-4914-865d-4faa564f1aef":"code.py",
|
| 141 |
"99c9cc74-fdc8-46c6-8f8d-3ce2d3bfeea3":"audio2.mp3",
|
| 142 |
"7bd855d8-463d-4ed5-93ca-5fe35145f733":"excel.xlsx"}
|
| 143 |
+
file_path = "TEMPP/"
|
| 144 |
print(f"Running agent on {len(questions_data)} questions...")
|
| 145 |
for item in questions_data:
|
| 146 |
task_id = item.get("task_id")
|
|
|
|
| 150 |
continue
|
| 151 |
try:
|
| 152 |
if task_id in tasks:
|
| 153 |
+
question_text = question_text + f"\n\nThis is the file path: {file_path + tasks[task_id]}"
|
| 154 |
submitted_answer = agent(question_text)
|
| 155 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
| 156 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
|
|
|
| 232 |
question_input = gr.Textbox(
|
| 233 |
label="Ask a question",
|
| 234 |
placeholder="Type your question here...",
|
| 235 |
+
lines=3,
|
| 236 |
max_lines=5,
|
| 237 |
+
container=True,
|
| 238 |
+
scale=3,
|
| 239 |
+
height=150
|
| 240 |
)
|
| 241 |
file_upload = gr.File(
|
| 242 |
label="Upload Files",
|
| 243 |
file_types=ALLOWED_FILE_EXTENSIONS,
|
| 244 |
file_count="multiple",
|
| 245 |
+
scale=1,
|
| 246 |
+
height=150
|
| 247 |
)
|
| 248 |
with gr.Row():
|
| 249 |
submit_btn = gr.Button("Send", variant="primary")
|