Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -86,13 +86,11 @@ def process_query(query_text: str, vectorstore):
|
|
86 |
|
87 |
# Updated HuggingFaceEndpoint configuration
|
88 |
model = HuggingFaceEndpoint(
|
89 |
-
repo_id="google/flan-t5-base",
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
},
|
95 |
-
huggingfacehub_api_token=os.getenv("HF_TOKEN") # Ensure token is set in .env
|
96 |
)
|
97 |
response_text = model.invoke(prompt) # Use invoke instead of predict
|
98 |
|
|
|
86 |
|
87 |
# Updated HuggingFaceEndpoint configuration
|
88 |
model = HuggingFaceEndpoint(
|
89 |
+
repo_id="google/flan-t5-base", # Подходит для text2text-generation
|
90 |
+
task="text2text-generation",
|
91 |
+
temperature=0.5, # Передаем явно как аргумент
|
92 |
+
max_length=512, # Передаем явно как аргумент
|
93 |
+
# huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN") # Токен из .env
|
|
|
|
|
94 |
)
|
95 |
response_text = model.invoke(prompt) # Use invoke instead of predict
|
96 |
|