alexkueck commited on
Commit
99366de
1 Parent(s): 20ab343

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -60,7 +60,7 @@ CHROMA_EXCEL = './chroma/kkg/excel'
60
  ###########################################
61
  #######################################
62
  #1. Alternative: HuggingFace Model name--------------------------------
63
- MODEL_NAME_HF = "t5-small" #"meta-llama/Meta-Llama-3-8B-Instruct" #"mistralai/Mistral-7B-Instruct-v0.3" #"microsoft/Phi-3-mini-4k-instruct" #"HuggingFaceH4/zephyr-7b-alpha"
64
 
65
  ############################################
66
  #2. Alternative_ HuggingFace Reop ID--------------------------------
@@ -235,7 +235,6 @@ def generate_text (prompt, chatbot, history, vektordatenbank, retriever, top_p=0
235
  ##############################################
236
  #1.Alternative mit Inference API ung HF EndPoint
237
  # Erstelle eine HuggingFaceEndPoints-Instanz mit den entsprechenden Endpunkt-Parametern
238
- """
239
  llm = HuggingFaceEndpoint(
240
  endpoint_url=f"https://api-inference.huggingface.co/models/{MODEL_NAME_HF}",
241
  api_key=hf_token,
@@ -246,11 +245,11 @@ def generate_text (prompt, chatbot, history, vektordatenbank, retriever, top_p=0
246
  repetition_penalty=repetition_penalty
247
  )
248
  result = rag_chain(llm, history_text_und_prompt, retriever)
249
- """
250
 
251
  #############################################
252
  #2. Alternative: mit API_URL
253
- result = rag_chain(API_URL, history_text_und_prompt, retriever)
254
 
255
  #############################################
256
  #3.te Alternative für pipeline
 
60
  ###########################################
61
  #######################################
62
  #1. Alternative: HuggingFace Model name--------------------------------
63
+ MODEL_NAME_HF = "HuggingFaceH4/zephyr-7b-alpha" #"t5-small" #"meta-llama/Meta-Llama-3-8B-Instruct" #"mistralai/Mistral-7B-Instruct-v0.3" #"microsoft/Phi-3-mini-4k-instruct" #"HuggingFaceH4/zephyr-7b-alpha"
64
 
65
  ############################################
66
  #2. Alternative_ HuggingFace Reop ID--------------------------------
 
235
  ##############################################
236
  #1.Alternative mit Inference API ung HF EndPoint
237
  # Erstelle eine HuggingFaceEndPoints-Instanz mit den entsprechenden Endpunkt-Parametern
 
238
  llm = HuggingFaceEndpoint(
239
  endpoint_url=f"https://api-inference.huggingface.co/models/{MODEL_NAME_HF}",
240
  api_key=hf_token,
 
245
  repetition_penalty=repetition_penalty
246
  )
247
  result = rag_chain(llm, history_text_und_prompt, retriever)
248
+
249
 
250
  #############################################
251
  #2. Alternative: mit API_URL
252
+ #result = rag_chain(API_URL, history_text_und_prompt, retriever)
253
 
254
  #############################################
255
  #3.te Alternative für pipeline