abhivsh commited on
Commit
a4dda72
·
verified ·
1 Parent(s): 8ba0138

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -98,7 +98,8 @@ history = "Hello !"
98
  def chat_query(question, history):
99
 
100
  query = f"As an experienced Electrical Engineer, answer pointwise to the Question : {question} and consider your previous reply as : {history[:-1]}, if any."
101
- llm = ChatOpenAI(model=llm_name, temperature=0.1, api_key = OPENAI_API_KEY)
 
102
 
103
  # Conversation Retrival Chain with Memory
104
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
@@ -147,7 +148,7 @@ with gr.Blocks(css="style.css", fill_height=True) as demo:
147
  with gr.Column(scale=10):
148
  gr.Markdown(Title)
149
 
150
- iface.render()
151
 
152
  if __name__ == "__main__":
153
- demo.queue().launch(debug=True)
 
98
  def chat_query(question, history):
99
 
100
  query = f"As an experienced Electrical Engineer, answer pointwise to the Question : {question} and consider your previous reply as : {history[:-1]}, if any."
101
+ #llm = ChatOpenAI(model=llm_name, temperature=0.1, api_key = OPENAI_API_KEY)
102
+ llm = GoogleGenerativeAI(model="gemini-1.0-pro", google_api_key=GEMINI_API_KEY)
103
 
104
  # Conversation Retrival Chain with Memory
105
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
 
148
  with gr.Column(scale=10):
149
  gr.Markdown(Title)
150
 
151
+ iface.launch()
152
 
153
  if __name__ == "__main__":
154
+ demo.launch(debug=True)