RCaz commited on
Commit
0b52792
·
verified ·
1 Parent(s): cede6a0

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -4
agent.py CHANGED
@@ -56,7 +56,7 @@ def extract_text_from_audio(file_path: str) -> str:
56
  "Could you please introduce yourself and your background?"
57
  """
58
  try:
59
- return joblib.load(f"cahced_files/{file_path}")
60
 
61
  except:
62
  client = OpenAI()
@@ -67,7 +67,7 @@ def extract_text_from_audio(file_path: str) -> str:
67
  file=audio_file,
68
  response_format="text"
69
  )
70
- joblib.dump(transcription, f"cahced_files/{file_path}")
71
  return transcription
72
 
73
  @tool
@@ -92,7 +92,7 @@ def describe_image(request:str, file_path: str) -> str:
92
  """
93
 
94
  try :
95
- return joblib.load(f"cahced_files/{file_path}")
96
 
97
  except:
98
  client = OpenAI()
@@ -121,7 +121,7 @@ def describe_image(request:str, file_path: str) -> str:
121
  }
122
  ],
123
  )
124
- joblib.dump(response.output_text,f"cahced_files/{file_path}")
125
  return response.output_text
126
 
127
 
 
56
  "Could you please introduce yourself and your background?"
57
  """
58
  try:
59
+ return joblib.load(f"{file_path}")
60
 
61
  except:
62
  client = OpenAI()
 
67
  file=audio_file,
68
  response_format="text"
69
  )
70
+ joblib.dump(transcription, f"{file_path}")
71
  return transcription
72
 
73
  @tool
 
92
  """
93
 
94
  try :
95
+ return joblib.load(f"{file_path}")
96
 
97
  except:
98
  client = OpenAI()
 
121
  }
122
  ],
123
  )
124
+ joblib.dump(response.output_text,f"{file_path}")
125
  return response.output_text
126
 
127