Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,10 @@ def get_chain(temperature):
|
|
82 |
# Replace the local OLMOLLM with the Hugging Face model
|
83 |
|
84 |
model_name = "gpt2"
|
85 |
-
pipe = pipeline("text-generation", model=model_name,
|
|
|
|
|
|
|
86 |
|
87 |
|
88 |
# Initialize the LangChain HuggingFacePipeline
|
|
|
82 |
# Replace the local OLMOLLM with the Hugging Face model
|
83 |
|
84 |
model_name = "gpt2"
|
85 |
+
pipe = pipeline("text-generation", model=model_name,
|
86 |
+
max_length=2500, # Allows for 2,093 input tokens + some generated tokens
|
87 |
+
max_new_tokens=200,
|
88 |
+
temperature = temperature)
|
89 |
|
90 |
|
91 |
# Initialize the LangChain HuggingFacePipeline
|