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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -151,7 +151,7 @@ def readitaloud(result):
151
  components.html(documentHTML5, width=800, height=300)
152
  #return 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 model for Llama 7B
157
  #API_KEY = os.getenv('API_KEY')
@@ -218,7 +218,7 @@ def chat_with_model(prompt, document_section, model_choice='Llama-2-7b-chat-hf')
218
 
219
 
220
  # Chat and Chat with files
221
- def chat_with_model_gpt(prompt, document_section, model_choice='gpt-3.5-turbo'):
222
  model = model_choice
223
  conversation = [{'role': 'system', 'content': 'You are a python script writer.'}]
224
  conversation.append({'role': 'user', 'content': prompt})
 
151
  components.html(documentHTML5, width=800, height=300)
152
  #return result
153
 
154
+ def chat_with_model_llama(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')
 
218
 
219
 
220
  # Chat and Chat with files
221
+ def chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):
222
  model = model_choice
223
  conversation = [{'role': 'system', 'content': 'You are a python script writer.'}]
224
  conversation.append({'role': 'user', 'content': prompt})