Spaces:
Runtime error
Runtime error
Initial commit with LlamaIndex-based agent
Browse files- app.py +5 -4
- requirements.txt +7 -5
app.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
-
|
2 |
-
import gradio as gr
|
3 |
-
import requests
|
4 |
-
import pandas as pd
|
5 |
from llama_index.llms.huggingface import HuggingFaceLLM
|
6 |
from llama_index.core.agent import ReActAgent
|
7 |
from llama_index.core.tools import FunctionTool
|
8 |
from transformers import AutoTokenizer
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# --- Constants ---
|
11 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
1 |
+
# Updated imports
|
|
|
|
|
|
|
2 |
from llama_index.llms.huggingface import HuggingFaceLLM
|
3 |
from llama_index.core.agent import ReActAgent
|
4 |
from llama_index.core.tools import FunctionTool
|
5 |
from transformers import AutoTokenizer
|
6 |
+
import os
|
7 |
+
import gradio as gr
|
8 |
+
import requests
|
9 |
+
import pandas as pd
|
10 |
|
11 |
# --- Constants ---
|
12 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
requirements.txt
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
llama-index
|
4 |
transformers
|
5 |
torch
|
6 |
accelerate
|
7 |
-
|
8 |
-
|
|
|
|
|
|
1 |
+
llama-index-core
|
2 |
+
llama-index-llms-huggingface
|
3 |
+
llama-index-agent-react
|
4 |
transformers
|
5 |
torch
|
6 |
accelerate
|
7 |
+
gradio
|
8 |
+
requests
|
9 |
+
pandas
|
10 |
+
python-dotenv
|