awacke1 commited on
Commit
089c389
·
1 Parent(s): cccfd4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -153,7 +153,7 @@ def readitaloud(result):
153
 
154
  def chat_with_model(prompt, document_section, model_choice='Llama-2-7b-chat-hf'):
155
  # API_URL = 'https://qe55p8afio98s0u3.us-east-1.aws.endpoints.huggingface.cloud' # Dr Llama
156
- API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-2-7b-chat-hf" # HF default model for l7b
157
  #API_KEY = os.getenv('API_KEY')
158
  API_KEY = os.getenv('HF_KEY')
159
  MODEL1="meta-llama/Llama-2-7b-chat-hf"
@@ -170,6 +170,7 @@ def chat_with_model(prompt, document_section, model_choice='Llama-2-7b-chat-hf')
170
  if len(document_section)>0:
171
  conversation.append({'role': 'assistant', 'content': document_section})
172
  start_time = time.time()
 
173
  report = []
174
  res_box = st.empty()
175
  collected_chunks = []
 
153
 
154
  def chat_with_model(prompt, document_section, model_choice='Llama-2-7b-chat-hf'):
155
  # API_URL = 'https://qe55p8afio98s0u3.us-east-1.aws.endpoints.huggingface.cloud' # Dr Llama
156
+ API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-2-7b-chat-hf" # HF model for Llama 7B
157
  #API_KEY = os.getenv('API_KEY')
158
  API_KEY = os.getenv('HF_KEY')
159
  MODEL1="meta-llama/Llama-2-7b-chat-hf"
 
170
  if len(document_section)>0:
171
  conversation.append({'role': 'assistant', 'content': document_section})
172
  start_time = time.time()
173
+ st.write('starting at ', start_time)
174
  report = []
175
  res_box = st.empty()
176
  collected_chunks = []