camparchimedes commited on
Commit
7f4c041
ยท
verified ยท
1 Parent(s): 19da83b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -27,6 +27,7 @@ from langchain_huggingface import HuggingFaceEndpoint
27
  from langchain_core.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
28
 
29
  #logging.basicConfig(level=logging.DEBUG)
 
30
  #HF_INFERENCE_ENDPOINT =
31
  #BOOKING_ID = re.compile(r'\b[A-Z]{6}\d{6}\b')
32
 
@@ -93,7 +94,7 @@ api_response_prompt = PromptTemplate(
93
 
94
  @cl.on_chat_start
95
  def setup_multiple_chains():
96
- HUGGINGFACE_API_TOKEN = os.environ.get("HUGGINGFACEHUB_API_TOKEN")
97
  llm = HuggingFaceEndpoint(
98
  #repo_id="google/gemma-2-2b", #"norallm/normistral-7b-warm-instruct",
99
  #endpoint_url="http://localhost:8010/",
@@ -104,7 +105,7 @@ def setup_multiple_chains():
104
  typical_p=0.95,
105
  temperature=0.7,
106
  repetition_penalty=1.03,
107
- huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
108
  task="text-generation"
109
  )
110
 
 
27
  from langchain_core.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
28
 
29
  #logging.basicConfig(level=logging.DEBUG)
30
+ HUGGINGFACE_API_TOKEN = os.environ.get("HUGGINGFACEHUB_API_TOKEN")
31
  #HF_INFERENCE_ENDPOINT =
32
  #BOOKING_ID = re.compile(r'\b[A-Z]{6}\d{6}\b')
33
 
 
94
 
95
  @cl.on_chat_start
96
  def setup_multiple_chains():
97
+
98
  llm = HuggingFaceEndpoint(
99
  #repo_id="google/gemma-2-2b", #"norallm/normistral-7b-warm-instruct",
100
  #endpoint_url="http://localhost:8010/",
 
105
  typical_p=0.95,
106
  temperature=0.7,
107
  repetition_penalty=1.03,
108
+ huggingfacehub_api_token=HUGGINGFACE_API_TOKEN,
109
  task="text-generation"
110
  )
111