dawid-lorek commited on
Commit
51df914
·
verified ·
1 Parent(s): 2c0ba2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,17 +1,18 @@
1
- # app.py – przywrócony layout oryginalnego benchmarku z integracją GAIA agent
2
 
3
  import os
4
  import requests
5
  import pandas as pd
6
  import gradio as gr
 
7
 
8
- from agent import answer_question, transcribe_audio, extract_excel_total_food_sales
9
 
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
 
12
  class GAIALlamaAgent:
13
  def __call__(self, question: str) -> str:
14
- return answer_question_sync(question)
15
 
16
  def run_and_submit_all(profile: gr.OAuthProfile | None):
17
  space_id = os.getenv("SPACE_ID")
 
1
+ # app.py – przywrócony layout benchmarku z poprawionym wywołaniem agenta
2
 
3
  import os
4
  import requests
5
  import pandas as pd
6
  import gradio as gr
7
+ import asyncio
8
 
9
+ from agent import answer_question
10
 
11
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
12
 
13
  class GAIALlamaAgent:
14
  def __call__(self, question: str) -> str:
15
+ return asyncio.run(answer_question(question))
16
 
17
  def run_and_submit_all(profile: gr.OAuthProfile | None):
18
  space_id = os.getenv("SPACE_ID")