Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ HF_TOKEN = os.getenv("HF_TOKEN", "")
|
|
| 18 |
# Use TinyLlama - Small, fast, and reliable
|
| 19 |
MODEL_NAME = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
|
| 20 |
# Use HuggingFace Inference API
|
| 21 |
-
API_URL = f"https://
|
| 22 |
|
| 23 |
def query_hf_model(prompt: str, max_tokens: int = 1000, temperature: float = 0.7, stream: bool = False):
|
| 24 |
"""Query Hugging Face Inference API"""
|
|
|
|
| 18 |
# Use TinyLlama - Small, fast, and reliable
|
| 19 |
MODEL_NAME = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
|
| 20 |
# Use HuggingFace Inference API
|
| 21 |
+
API_URL = f"https://router.huggingface.co/hf-inference/models/{MODEL_NAME}"
|
| 22 |
|
| 23 |
def query_hf_model(prompt: str, max_tokens: int = 1000, temperature: float = 0.7, stream: bool = False):
|
| 24 |
"""Query Hugging Face Inference API"""
|