Imsachinsingh00 commited on
Commit
b3b9f17
Β·
1 Parent(s): 7dcca7a

Initial and final commit

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
- from langchain.llms import HuggingFaceHub
3
  import os
 
4
 
5
  st.set_page_config(page_title="Educational Chatbot")
6
  st.title("πŸŽ“ Educational Chatbot")
@@ -17,7 +17,7 @@ if user_input:
17
  huggingfacehub_api_token=os.environ.get("HUGGINGFACEHUB_API_TOKEN"),
18
  model_kwargs={"temperature": 0.5, "max_new_tokens": 100}
19
  )
20
- response = llm(user_input)
21
  st.session_state.history.append(("You", user_input))
22
  st.session_state.history.append(("Bot", response))
23
  except Exception as e:
 
1
  import streamlit as st
 
2
  import os
3
+ from langchain_community.llms import HuggingFaceHub
4
 
5
  st.set_page_config(page_title="Educational Chatbot")
6
  st.title("πŸŽ“ Educational Chatbot")
 
17
  huggingfacehub_api_token=os.environ.get("HUGGINGFACEHUB_API_TOKEN"),
18
  model_kwargs={"temperature": 0.5, "max_new_tokens": 100}
19
  )
20
+ response = llm.invoke(user_input)
21
  st.session_state.history.append(("You", user_input))
22
  st.session_state.history.append(("Bot", response))
23
  except Exception as e: