abdullahalzubaer commited on
Commit
fd2d390
1 Parent(s): 71c345d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -11,8 +11,8 @@ st.title("ChatGPT-like Chatbot")
11
  base_url="https://api-inference.huggingface.co/models/"
12
 
13
  API_KEY = os.environ.get('HUGGINGFACE_API_KEY')
14
- print(API_KEY)
15
- headers = {"Authorization":"Bearer "+API_KEY}
16
 
17
  model_links ={
18
  "Mistral-7B":base_url+"mistralai/Mistral-7B-Instruct-v0.2",
@@ -134,8 +134,8 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
134
  # Display assistant response in chat message container
135
  with st.chat_message("assistant"):
136
  client = InferenceClient(
137
- model=model_links[selected_model],
138
- headers=headers)
139
 
140
  output = client.text_generation(
141
  formated_text,
 
11
  base_url="https://api-inference.huggingface.co/models/"
12
 
13
  API_KEY = os.environ.get('HUGGINGFACE_API_KEY')
14
+ # print(API_KEY)
15
+ # headers = {"Authorization":"Bearer "+API_KEY}
16
 
17
  model_links ={
18
  "Mistral-7B":base_url+"mistralai/Mistral-7B-Instruct-v0.2",
 
134
  # Display assistant response in chat message container
135
  with st.chat_message("assistant"):
136
  client = InferenceClient(
137
+ model=model_links[selected_model],)
138
+ # headers=headers)
139
 
140
  output = client.text_generation(
141
  formated_text,