Samarth991 commited on
Commit
57005dc
1 Parent(s): 49dbc00

adding online PDF loader

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -38,10 +38,11 @@ def get_hugging_face_model(model_id,API_key,temperature=0.1):
38
  return chat_llm
39
 
40
  def chat_application(llm_service,key):
41
- if llm_model == 'HuggingFace':
42
  llm = get_hugging_face_model(model_id='tiiuae/falcon-7b-instruct',API_key=key)
43
  else:
44
- llm_model = get_openai_chat_model(API_key=key)
 
45
 
46
 
47
  def document_loader(file_path,api_key,doc_type='pdf',llm='Huggingface'):
 
38
  return chat_llm
39
 
40
  def chat_application(llm_service,key):
41
+ if llm_service == 'HuggingFace':
42
  llm = get_hugging_face_model(model_id='tiiuae/falcon-7b-instruct',API_key=key)
43
  else:
44
+ llm = get_openai_chat_model(API_key=key)
45
+ return llm
46
 
47
 
48
  def document_loader(file_path,api_key,doc_type='pdf',llm='Huggingface'):