HF_Agents_Final_Project / docs /file_handling.md
Yago Bolivar
change file name
abfabef

A newer version of the Gradio SDK is available: 5.43.1

Upgrade

Downloaded files

Agent's requirements for the downloaded files:

  • Detect the file type based on the extension and the linked question (referenced in common_questions.py).
  • Audio Files (.mp3):
    Use speech-to-text routines to transcribe the audio and then extract the required answer (e.g. page numbers or ingredient lists) with proper post‑processing (sorting, deduplication).
  • Spreadsheet Files (.xlsx):
    Parse the Excel file (using tools like pandas) to extract the numeric sales data, summing up relevant columns and formatting the number as specified.
  • Image Files (.png):
    Apply OCR or vision reasoning to interpret the chess position (or extract text details) so that the agent can compute the correct algebraic move.
  • Python Code Files (.py):
    Safely execute the code snippet in a sandboxed environment to capture its output (the final numeric value).

In short, the agent must determine which specialized tool (speech-to-text, spreadsheet reader, OCR/vision, or code interpreter) to invoke for each file type and then synthesize the outputs, ensuring that the final answers meet the exact-match formatting specified in the submission instructions (submission_instructions.md).