razvanfischer commited on
Commit
33f7dfc
·
2 Parent(s): dbb37c1 8609cfe

Solved conflicts

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import os
2
  import gradio as gr
3
  import pandas as pd
 
4
  import asyncio
5
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
6
  from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
@@ -10,6 +11,7 @@ from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
10
  from llama_index.readers.web import SimpleWebPageReader
11
  import requests
12
  from huggingface_hub import InferenceClient
 
13
  from llama_index.readers.wikipedia import WikipediaReader
14
  from llama_index.core.agent.workflow import (
15
  AgentInput,
@@ -21,7 +23,6 @@ from llama_index.core.agent.workflow import (
21
  import requests
22
  from bs4 import BeautifulSoup
23
  from urllib.parse import urljoin
24
-
25
  # (Keep Constants as is)
26
  # --- Constants ---
27
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
@@ -184,7 +185,6 @@ class BasicAgent:
184
  """Useful for subtracting two numbers"""
185
  return a - b
186
 
187
-
188
  def run_and_submit_all(profile: gr.OAuthProfile | None):
189
  """
190
  Fetches all questions, runs the BasicAgent on them, submits all answers,
@@ -365,4 +365,4 @@ if __name__ == "__main__":
365
  print("-" * (60 + len(" App Starting ")) + "\n")
366
 
367
  print("Launching Gradio Interface for Basic Agent Evaluation...")
368
- demo.launch(debug=True, share=False)
 
1
  import os
2
  import gradio as gr
3
  import pandas as pd
4
+ from huggingface_hub import InferenceClient
5
  import asyncio
6
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
7
  from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
 
11
  from llama_index.readers.web import SimpleWebPageReader
12
  import requests
13
  from huggingface_hub import InferenceClient
14
+
15
  from llama_index.readers.wikipedia import WikipediaReader
16
  from llama_index.core.agent.workflow import (
17
  AgentInput,
 
23
  import requests
24
  from bs4 import BeautifulSoup
25
  from urllib.parse import urljoin
 
26
  # (Keep Constants as is)
27
  # --- Constants ---
28
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
 
185
  """Useful for subtracting two numbers"""
186
  return a - b
187
 
 
188
  def run_and_submit_all(profile: gr.OAuthProfile | None):
189
  """
190
  Fetches all questions, runs the BasicAgent on them, submits all answers,
 
365
  print("-" * (60 + len(" App Starting ")) + "\n")
366
 
367
  print("Launching Gradio Interface for Basic Agent Evaluation...")
368
+ demo.launch(debug=True, share=False)