Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,12 @@ import os
|
|
| 8 |
llm = HuggingFaceEndpoint(
|
| 9 |
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 10 |
temperature=0.7,
|
| 11 |
-
model_kwargs={
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
|
| 13 |
)
|
| 14 |
|
|
|
|
| 8 |
llm = HuggingFaceEndpoint(
|
| 9 |
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 10 |
temperature=0.7,
|
| 11 |
+
model_kwargs={
|
| 12 |
+
"max_length": 256, # Reduced from 512
|
| 13 |
+
"max_new_tokens": 256, # Add explicit limit
|
| 14 |
+
"do_sample": True,
|
| 15 |
+
"top_p": 0.9
|
| 16 |
+
},
|
| 17 |
huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
|
| 18 |
)
|
| 19 |
|