cesarleoni commited on
Commit
8ad749f
·
verified ·
1 Parent(s): 47ba1cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -1,4 +1,3 @@
1
- ```python
2
  import os
3
  import gradio as gr
4
  import requests
@@ -38,7 +37,6 @@ class YouTubeTranscriptTool:
38
 
39
  class WhisperASRTool:
40
  def run(self, filename: str) -> str:
41
- # Uses OpenAI Whisper API for transcription
42
  with open(filename, "rb") as audio_file:
43
  resp = client.audio.transcriptions.create(
44
  file=audio_file,
@@ -48,7 +46,6 @@ class WhisperASRTool:
48
 
49
  class ChessAnalysisTool:
50
  def run(self, image_path: str) -> str:
51
- # TODO: integrate OCR to parse FEN from image
52
  board = chess.Board()
53
  engine = chess.engine.SimpleEngine.popen_uci("stockfish")
54
  result = engine.play(board, chess.engine.Limit(depth=15))
@@ -108,7 +105,8 @@ class EnhancedGaiaAgent:
108
  return answer
109
 
110
  # --- Gradio App Wiring ---
111
- with gr.Blocks() as demo:
 
112
  gr.Markdown("# GAIA Level 1: Enhanced Multi-Tool Agent")
113
  gr.Markdown(
114
  """
@@ -154,4 +152,3 @@ with gr.Blocks() as demo:
154
 
155
  if __name__ == "__main__":
156
  demo.launch(debug=True, share=False)
157
- ```
 
 
1
  import os
2
  import gradio as gr
3
  import requests
 
37
 
38
  class WhisperASRTool:
39
  def run(self, filename: str) -> str:
 
40
  with open(filename, "rb") as audio_file:
41
  resp = client.audio.transcriptions.create(
42
  file=audio_file,
 
46
 
47
  class ChessAnalysisTool:
48
  def run(self, image_path: str) -> str:
 
49
  board = chess.Board()
50
  engine = chess.engine.SimpleEngine.popen_uci("stockfish")
51
  result = engine.play(board, chess.engine.Limit(depth=15))
 
105
  return answer
106
 
107
  # --- Gradio App Wiring ---
108
+ demo = gr.Blocks()
109
+ with demo:
110
  gr.Markdown("# GAIA Level 1: Enhanced Multi-Tool Agent")
111
  gr.Markdown(
112
  """
 
152
 
153
  if __name__ == "__main__":
154
  demo.launch(debug=True, share=False)