karar-shah commited on
Commit
7c275bd
1 Parent(s): c7f7829

Update test_gradio.py

Browse files
Files changed (1) hide show
  1. test_gradio.py +5 -6
test_gradio.py CHANGED
@@ -3,8 +3,7 @@ from langchain.prompts import PromptTemplate
3
  from langchain.chains import LLMChain
4
  from langchain.llms import GooglePalm
5
 
6
-
7
- llm = GooglePalm(temperature=0.1, google_api_key= "AIzaSyB5XIeNPyhIy29g4DUNZzVBKfsa-fVZtrk")
8
 
9
  template = """Question: {question}
10
 
@@ -12,7 +11,7 @@ Answer: Let's think step by step."""
12
 
13
  prompt_open = PromptTemplate(template=template, input_variables=["question"])
14
 
15
- open_chain = LLMChain(prompt=prompt_open,llm = llm)
16
 
17
 
18
  def predict(message, history):
@@ -20,10 +19,10 @@ def predict(message, history):
20
  return gpt_response
21
 
22
  gr.Markdown(
23
- """
24
  # Let's think step by step!
25
  I will break your question into steps :)
 
 
26
 
27
- """)
28
-
29
  gr.ChatInterface(predict).launch(share=False)
 
3
  from langchain.chains import LLMChain
4
  from langchain.llms import GooglePalm
5
 
6
+ llm = GooglePalm(temperature=0.1, google_api_key="AIzaSyB5XIeNPyhIy29g4DUNZzVBKfsa-fVZtrk")
 
7
 
8
  template = """Question: {question}
9
 
 
11
 
12
  prompt_open = PromptTemplate(template=template, input_variables=["question"])
13
 
14
+ open_chain = LLMChain(prompt=prompt_open, llm=llm)
15
 
16
 
17
  def predict(message, history):
 
19
  return gpt_response
20
 
21
  gr.Markdown(
22
+ """
23
  # Let's think step by step!
24
  I will break your question into steps :)
25
+ """
26
+ )
27
 
 
 
28
  gr.ChatInterface(predict).launch(share=False)