Spaces:
Sleeping
Sleeping
Alexandre Gazola
commited on
Commit
·
3917bae
1
Parent(s):
61d9cdf
test
Browse files
app.py
CHANGED
@@ -144,10 +144,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
144 |
print(f"The following question has attatched file: {question_text[:10]}")
|
145 |
|
146 |
if file_name.endswith(('.mp3', '.xlsx', '.png')):
|
147 |
-
base64_attatched_file = get_text_file_contents(file_name
|
148 |
question_text_for_agent += f'. The content in base64 of the attatched file mentioned in the question is the following: {base64_attatched_file}'
|
149 |
else:
|
150 |
-
plain_txt_file = get_text_file_contents(file_name)
|
151 |
question_text_for_agent += f'. The attatchement has the following content: {plain_txt_file}'
|
152 |
question_text_for_agent += f'. The content in base64 of the attatched file mentioned in the question is the following: {base64_attatched_file}'
|
153 |
submitted_answer = agent(question_text_for_agent)
|
|
|
144 |
print(f"The following question has attatched file: {question_text[:10]}")
|
145 |
|
146 |
if file_name.endswith(('.mp3', '.xlsx', '.png')):
|
147 |
+
base64_attatched_file = get_text_file_contents(f'./files/{file_name}.b64')
|
148 |
question_text_for_agent += f'. The content in base64 of the attatched file mentioned in the question is the following: {base64_attatched_file}'
|
149 |
else:
|
150 |
+
plain_txt_file = get_text_file_contents(f'./files/{file_name}')
|
151 |
question_text_for_agent += f'. The attatchement has the following content: {plain_txt_file}'
|
152 |
question_text_for_agent += f'. The content in base64 of the attatched file mentioned in the question is the following: {base64_attatched_file}'
|
153 |
submitted_answer = agent(question_text_for_agent)
|