Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- app.py +1 -1
- decomposer.py +2 -2
- formatter.py +1 -1
- tools/__pycache__/__init__.cpython-312.pyc +0 -0
- tools/__pycache__/attachments.cpython-312.pyc +0 -0
- tools/__pycache__/exec_code.cpython-312.pyc +0 -0
- tools/__pycache__/search.cpython-312.pyc +0 -0
- tools/__pycache__/webpage.cpython-312.pyc +0 -0
- tools/__pycache__/wikipedia.cpython-312.pyc +0 -0
- tools/__pycache__/youtube.cpython-312.pyc +0 -0
- tools/attachments.py +2 -2
app.py
CHANGED
|
@@ -60,7 +60,7 @@ class BasicAgent:
|
|
| 60 |
# smolagents μ½λ νμκ° κΉ¨μ§λ€(μ΄μ 32B μ½λ μλμμ νμΈλ¨).
|
| 61 |
self.model = InferenceClientModel(
|
| 62 |
model_id="Qwen/Qwen2.5-72B-Instruct",
|
| 63 |
-
provider="
|
| 64 |
max_tokens=2048, # ν μ€ν
λΉ LLM μλ΅ ν ν° νλ
|
| 65 |
)
|
| 66 |
|
|
|
|
| 60 |
# smolagents μ½λ νμκ° κΉ¨μ§λ€(μ΄μ 32B μ½λ μλμμ νμΈλ¨).
|
| 61 |
self.model = InferenceClientModel(
|
| 62 |
model_id="Qwen/Qwen2.5-72B-Instruct",
|
| 63 |
+
provider="auto",
|
| 64 |
max_tokens=2048, # ν μ€ν
λΉ LLM μλ΅ ν ν° νλ
|
| 65 |
)
|
| 66 |
|
decomposer.py
CHANGED
|
@@ -55,8 +55,8 @@ def decompose_question(
|
|
| 55 |
λ©ν°ν plan(numbered list ν
μ€νΈ) λλ None(λ¨μΌ lookup/μ€ν¨).
|
| 56 |
"""
|
| 57 |
try:
|
| 58 |
-
# provider="
|
| 59 |
-
client = InferenceClient(provider="
|
| 60 |
resp = client.chat_completion(
|
| 61 |
model=model_id,
|
| 62 |
messages=[
|
|
|
|
| 55 |
λ©ν°ν plan(numbered list ν
μ€νΈ) λλ None(λ¨μΌ lookup/μ€ν¨).
|
| 56 |
"""
|
| 57 |
try:
|
| 58 |
+
# provider="auto": HF Inference Providers ν¬λ λ§ νμμ κ°μ©ν κ³³μΌλ‘ μλ λΌμ°ν
.
|
| 59 |
+
client = InferenceClient(provider="auto") # HF_TOKEN νκ²½λ³μ μ¬μ©
|
| 60 |
resp = client.chat_completion(
|
| 61 |
model=model_id,
|
| 62 |
messages=[
|
formatter.py
CHANGED
|
@@ -125,7 +125,7 @@ def final_format_pass(
|
|
| 125 |
return raw_answer
|
| 126 |
try:
|
| 127 |
from huggingface_hub import InferenceClient
|
| 128 |
-
client = InferenceClient(provider="
|
| 129 |
resp = client.chat_completion(
|
| 130 |
model=model_id,
|
| 131 |
messages=[
|
|
|
|
| 125 |
return raw_answer
|
| 126 |
try:
|
| 127 |
from huggingface_hub import InferenceClient
|
| 128 |
+
client = InferenceClient(provider="auto")
|
| 129 |
resp = client.chat_completion(
|
| 130 |
model=model_id,
|
| 131 |
messages=[
|
tools/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/tools/__pycache__/__init__.cpython-312.pyc and b/tools/__pycache__/__init__.cpython-312.pyc differ
|
|
|
tools/__pycache__/attachments.cpython-312.pyc
CHANGED
|
Binary files a/tools/__pycache__/attachments.cpython-312.pyc and b/tools/__pycache__/attachments.cpython-312.pyc differ
|
|
|
tools/__pycache__/exec_code.cpython-312.pyc
CHANGED
|
Binary files a/tools/__pycache__/exec_code.cpython-312.pyc and b/tools/__pycache__/exec_code.cpython-312.pyc differ
|
|
|
tools/__pycache__/search.cpython-312.pyc
CHANGED
|
Binary files a/tools/__pycache__/search.cpython-312.pyc and b/tools/__pycache__/search.cpython-312.pyc differ
|
|
|
tools/__pycache__/webpage.cpython-312.pyc
CHANGED
|
Binary files a/tools/__pycache__/webpage.cpython-312.pyc and b/tools/__pycache__/webpage.cpython-312.pyc differ
|
|
|
tools/__pycache__/wikipedia.cpython-312.pyc
CHANGED
|
Binary files a/tools/__pycache__/wikipedia.cpython-312.pyc and b/tools/__pycache__/wikipedia.cpython-312.pyc differ
|
|
|
tools/__pycache__/youtube.cpython-312.pyc
CHANGED
|
Binary files a/tools/__pycache__/youtube.cpython-312.pyc and b/tools/__pycache__/youtube.cpython-312.pyc differ
|
|
|
tools/attachments.py
CHANGED
|
@@ -182,7 +182,7 @@ def _handle_image(content: bytes, content_type: str) -> str:
|
|
| 182 |
"numbers, or labels."
|
| 183 |
)
|
| 184 |
|
| 185 |
-
client = InferenceClient(provider="
|
| 186 |
resp = client.chat_completion(
|
| 187 |
model="Qwen/Qwen2.5-VL-7B-Instruct",
|
| 188 |
messages=[
|
|
@@ -215,7 +215,7 @@ def _handle_audio(content: bytes, content_type: str) -> str:
|
|
| 215 |
"""
|
| 216 |
try:
|
| 217 |
from huggingface_hub import InferenceClient
|
| 218 |
-
client = InferenceClient(provider="
|
| 219 |
result = client.automatic_speech_recognition(
|
| 220 |
audio=content,
|
| 221 |
model="openai/whisper-large-v3",
|
|
|
|
| 182 |
"numbers, or labels."
|
| 183 |
)
|
| 184 |
|
| 185 |
+
client = InferenceClient(provider="auto") # HF_TOKEN νκ²½λ³μ μ¬μ©
|
| 186 |
resp = client.chat_completion(
|
| 187 |
model="Qwen/Qwen2.5-VL-7B-Instruct",
|
| 188 |
messages=[
|
|
|
|
| 215 |
"""
|
| 216 |
try:
|
| 217 |
from huggingface_hub import InferenceClient
|
| 218 |
+
client = InferenceClient(provider="auto")
|
| 219 |
result = client.automatic_speech_recognition(
|
| 220 |
audio=content,
|
| 221 |
model="openai/whisper-large-v3",
|