nikhmr1235 commited on
Commit
fa0ebe2
·
verified ·
1 Parent(s): 5aab55b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -230,9 +230,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
230
  {tools}
231
 
232
  **File Handling:**
233
- 1. Always check the `additional_args` dictionary for file attachments. If the 'file' key exists within `additional_args`, it means a file attachment is present at additional_args['file]['local_filepath'].
234
  2. **IF** `additional_args` contains a 'file' key:
235
- * **Action:** use the available tools (e.g., `python_repl` if the file contains executable Python code) to parse and extract the answer from the loaded content.
 
236
  3. **IF** input has an image:
237
  * **Action:** image is available in additional_args['images']
238
  4. **ELSE** if a link to the file is directly part of the input, use available tools to access the file.
 
230
  {tools}
231
 
232
  **File Handling:**
233
+ 1. Always check the `additional_args` dictionary for file attachments. If the 'file' key exists within `additional_args`, it means a file attachment is present LOCALLY at additional_args['file]['local_filepath'].
234
  2. **IF** `additional_args` contains a 'file' key:
235
+ * **Action:** load the local file content at additional_args['file]['local_filepath'] using python_repl tool
236
+ * **Action:** use the available tools (e.g., `python_repl` if the file contains executable Python code) to parse/execute and extract the answer from the loaded content.
237
  3. **IF** input has an image:
238
  * **Action:** image is available in additional_args['images']
239
  4. **ELSE** if a link to the file is directly part of the input, use available tools to access the file.