samim2024 commited on
Commit
44cbe3f
Β·
verified Β·
1 Parent(s): cd070ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -21,12 +21,6 @@ if 'API_Key' not in st.session_state:
21
  # Setting page title and header
22
  st.set_page_config(page_title="Chat GPT Clone", page_icon=":robot_face:")
23
  st.markdown("<h1 style='text-align: center;'>How can I assist you? </h1>", unsafe_allow_html=True)
24
- st.markdown('''
25
- :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]
26
- :gray[pretty] :rainbow[colors].''')
27
- st.markdown("Here's a bouquet &mdash;\
28
- :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")
29
-
30
 
31
  st.sidebar.title("😎")
32
  st.session_state['API_Key']= st.sidebar.text_input("What's your API key?",type="password")
@@ -44,7 +38,7 @@ def getresponse(userInput, api_key):
44
 
45
  llm = HuggingFaceEndpoint(
46
  temperature=0.7,
47
- token=api_key,
48
  repo_id="mistralai/Mistral-7B-Instruct-v0.2" # 'text-davinci-003' model is depreciated now, so we are using the openai's recommended model
49
  )
50
 
 
21
  # Setting page title and header
22
  st.set_page_config(page_title="Chat GPT Clone", page_icon=":robot_face:")
23
  st.markdown("<h1 style='text-align: center;'>How can I assist you? </h1>", unsafe_allow_html=True)
 
 
 
 
 
 
24
 
25
  st.sidebar.title("😎")
26
  st.session_state['API_Key']= st.sidebar.text_input("What's your API key?",type="password")
 
38
 
39
  llm = HuggingFaceEndpoint(
40
  temperature=0.7,
41
+ HUGGINGFACEHUB_API_TOKEN=api_key,
42
  repo_id="mistralai/Mistral-7B-Instruct-v0.2" # 'text-davinci-003' model is depreciated now, so we are using the openai's recommended model
43
  )
44