Alexandre Gazola commited on
Commit
92d888e
·
1 Parent(s): e6ea6f7
Files changed (2) hide show
  1. app.py +1 -0
  2. langchain_agent.py +3 -3
app.py CHANGED
@@ -94,6 +94,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
94
  print('testing whisper')
95
  whisper_return = audio_to_text(file_path)
96
  print(whisper_return)
 
97
  else:
98
  file_path = os.path.join(BASE_DIR, 'files', file_name)
99
  plain_txt_file = get_text_file_contents(file_path)
 
94
  print('testing whisper')
95
  whisper_return = audio_to_text(file_path)
96
  print(whisper_return)
97
+ return None
98
  else:
99
  file_path = os.path.join(BASE_DIR, 'files', file_name)
100
  plain_txt_file = get_text_file_contents(file_path)
langchain_agent.py CHANGED
@@ -16,7 +16,7 @@ from excel_parser_tool import parse_excel
16
  from analyse_chess_position_tool import get_chess_best_move
17
  from convert_chessboard_image_to_fen_tool import convert_chessboard_image_to_fen
18
  from chess_image_to_fen_tool import chess_image_to_fen
19
-
20
 
21
  class LangChainAgent:
22
  def __init__(self):
@@ -33,9 +33,9 @@ class LangChainAgent:
33
  internet_search,
34
  get_botanical_classification,
35
  parse_excel,
36
- #convert_chessboard_image_to_fen,
37
  chess_image_to_fen,
38
- get_chess_best_move
 
39
  ]
40
 
41
  prompt = ChatPromptTemplate.from_messages([
 
16
  from analyse_chess_position_tool import get_chess_best_move
17
  from convert_chessboard_image_to_fen_tool import convert_chessboard_image_to_fen
18
  from chess_image_to_fen_tool import chess_image_to_fen
19
+ from audio_to_text_tool import audio_to_text
20
 
21
  class LangChainAgent:
22
  def __init__(self):
 
33
  internet_search,
34
  get_botanical_classification,
35
  parse_excel,
 
36
  chess_image_to_fen,
37
+ get_chess_best_move,
38
+ audio_to_text
39
  ]
40
 
41
  prompt = ChatPromptTemplate.from_messages([