jdesiree commited on
Commit
5c95c43
·
verified ·
1 Parent(s): a1c7e54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -18,12 +18,13 @@ if "HUGGINGFACEHUB_API_TOKEN" not in os.environ:
18
 
19
  # --- LLM and Template Configuration ---
20
  llm = HuggingFaceEndpoint(
21
- repo_id="google/gemma-2b",
22
  temperature=0.7,
23
  max_new_tokens=512,
24
  huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN"),
25
- task="text2text-generation"
26
  )
 
27
  math_template = ChatPromptTemplate.from_messages([
28
  ("system", """{system_message}
29
  You are an expert math tutor. For every math problem:
 
18
 
19
  # --- LLM and Template Configuration ---
20
  llm = HuggingFaceEndpoint(
21
+ repo_id="HuggingFaceH4/zephyr-7b-alpha", # inference-ready model
22
  temperature=0.7,
23
  max_new_tokens=512,
24
  huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN"),
25
+ task="text-generation" # <— important: use text-generation, not text2text-generation
26
  )
27
+
28
  math_template = ChatPromptTemplate.from_messages([
29
  ("system", """{system_message}
30
  You are an expert math tutor. For every math problem: