jdesiree commited on
Commit
ad2b648
·
verified ·
1 Parent(s): a232a34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -7,8 +7,10 @@ import os
7
  # Set up the LangChain model (using HuggingFace Zephyr model)
8
  llm = HuggingFaceEndpoint(
9
  repo_id="HuggingFaceH4/zephyr-7b-beta",
10
- temperature=0.7,
11
- max_length=512,
 
 
12
  huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
13
  )
14
 
@@ -118,11 +120,11 @@ demo = gr.ChatInterface(
118
  Try asking me anything about learning!
119
  """,
120
  examples=[
121
- "Solve the equation 3x + 7 = 22 step by step",
122
- "How do I find reliable sources for my history paper?",
123
- "What's the best way to study for a biology exam?",
124
- "Explain the Pythagorean theorem with an example",
125
- "How do I cite a website in MLA format?"
126
  ],
127
  additional_inputs=[
128
  gr.Textbox(
 
7
  # Set up the LangChain model (using HuggingFace Zephyr model)
8
  llm = HuggingFaceEndpoint(
9
  repo_id="HuggingFaceH4/zephyr-7b-beta",
10
+ model_kwargs={
11
+ "temperature": 0.7,
12
+ "max_length": 512
13
+ },
14
  huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
15
  )
16
 
 
120
  Try asking me anything about learning!
121
  """,
122
  examples=[
123
+ ["Solve the equation 3x + 7 = 22 step by step"],
124
+ ["How do I find reliable sources for my history paper?"],
125
+ ["What's the best way to study for a biology exam?"],
126
+ ["Explain the Pythagorean theorem with an example"],
127
+ ["How do I cite a website in MLA format?"]
128
  ],
129
  additional_inputs=[
130
  gr.Textbox(