rahgadda commited on
Commit
8efc289
·
verified ·
1 Parent(s): 5528531

Initial Draft

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -179,6 +179,7 @@ def fn_create_chatllm(ui_llm_provider, ui_api_key, ui_model_details):
179
  )
180
  elif(ui_llm_provider == 'Google VertexAI'):
181
  lv_api_key = json.loads(ui_api_key)
 
182
  g_creds = service_account.Credentials.from_service_account_info(lv_api_key)
183
  lv_model = ChatVertexAI(
184
  project=lv_api_key.get("project_id"),
@@ -443,6 +444,11 @@ def main():
443
 
444
  if col1.button("Extract"):
445
 
 
 
 
 
 
446
  if ui_youtube_url:
447
  lv_extracted_text +=fn_you_tube_video_transcript(ui_youtube_url,ui_processing_message)
448
 
 
179
  )
180
  elif(ui_llm_provider == 'Google VertexAI'):
181
  lv_api_key = json.loads(ui_api_key)
182
+ os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = lv_api_key['private_key']
183
  g_creds = service_account.Credentials.from_service_account_info(lv_api_key)
184
  lv_model = ChatVertexAI(
185
  project=lv_api_key.get("project_id"),
 
444
 
445
  if col1.button("Extract"):
446
 
447
+ lv_extracted_text = ""
448
+ st.session_state.lv_extracted_text = lv_extracted_text
449
+ lv_response = ""
450
+ st.session_state.lv_response = lv_response
451
+
452
  if ui_youtube_url:
453
  lv_extracted_text +=fn_you_tube_video_transcript(ui_youtube_url,ui_processing_message)
454