Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ from langchain_core.documents import Document
|
|
| 12 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace, HuggingFaceEmbeddings
|
| 13 |
from langchain_core.messages import HumanMessage
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
# (Keep Constants as is)
|
| 18 |
# --- Constants ---
|
|
@@ -51,9 +51,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 51 |
|
| 52 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 53 |
try:
|
| 54 |
-
|
| 55 |
-
HF_KEY = os.getenv("HF_TOKEN")
|
| 56 |
-
|
| 57 |
llm = ChatHuggingFace(
|
| 58 |
llm=HuggingFaceEndpoint(
|
| 59 |
repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
|
|
| 12 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace, HuggingFaceEmbeddings
|
| 13 |
from langchain_core.messages import HumanMessage
|
| 14 |
|
| 15 |
+
load_dotenv()
|
| 16 |
|
| 17 |
# (Keep Constants as is)
|
| 18 |
# --- Constants ---
|
|
|
|
| 51 |
|
| 52 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 53 |
try:
|
| 54 |
+
|
|
|
|
|
|
|
| 55 |
llm = ChatHuggingFace(
|
| 56 |
llm=HuggingFaceEndpoint(
|
| 57 |
repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|