Update app.py
Browse files
app.py
CHANGED
@@ -290,16 +290,7 @@ def invoke (prompt, history, rag_option, openai_api_key, temperature=0.9, max_n
|
|
290 |
#oder an Hugging Face
|
291 |
#llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64})
|
292 |
#llm = HuggingFaceHub(url_??? = "https://wdgsjd6zf201mufn.us-east-1.aws.endpoints.huggingface.cloud", model_kwargs={"temperature": 0.5, "max_length": 64})
|
293 |
-
llm = HuggingFaceTextGenInference(
|
294 |
-
inference_server_url="https://wdgsjd6zf201mufn.us-east-1.aws.endpoints.huggingface.cloud", #"http://localhost:8010/",
|
295 |
-
user = "Bearer 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",
|
296 |
-
max_new_tokens=max_new_tokens,
|
297 |
-
top_k=10,
|
298 |
-
top_p=top_p,
|
299 |
-
typical_p=0.95,
|
300 |
-
temperature=temperature,
|
301 |
-
repetition_penalty=repetition_penalty,
|
302 |
-
)
|
303 |
|
304 |
#zusätzliche Dokumenten Splits aus DB zum Prompt hinzufügen (aus VektorDB - Chroma oder Mongo DB)
|
305 |
if (rag_option == "An"):
|
|
|
290 |
#oder an Hugging Face
|
291 |
#llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64})
|
292 |
#llm = HuggingFaceHub(url_??? = "https://wdgsjd6zf201mufn.us-east-1.aws.endpoints.huggingface.cloud", model_kwargs={"temperature": 0.5, "max_length": 64})
|
293 |
+
#llm = HuggingFaceTextGenInference( inference_server_url="http://localhost:8010/", max_new_tokens=max_new_tokens,top_k=10,top_p=top_p,typical_p=0.95,temperature=temperature,repetition_penalty=repetition_penalty,)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
|
295 |
#zusätzliche Dokumenten Splits aus DB zum Prompt hinzufügen (aus VektorDB - Chroma oder Mongo DB)
|
296 |
if (rag_option == "An"):
|