Pijush2023 commited on
Commit
209dea0
·
verified ·
1 Parent(s): f79c471

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -1347,7 +1347,7 @@ def show_map_if_details(history, choice):
1347
  if choice in ["Details", "Conversational"]:
1348
  return gr.update(visible=True), update_map_with_response(history)
1349
  else:
1350
- return gr.update(visible(False), "")
1351
 
1352
  def generate_audio_elevenlabs(text):
1353
  XI_API_KEY = os.environ['ELEVENLABS_API']
@@ -1412,6 +1412,7 @@ def check_login(username, password):
1412
  return "Invalid username or password.", gr.update(visible=True), gr.update(visible=False)
1413
 
1414
  with gr.Blocks() as demo:
 
1415
  with gr.Row(visible=not authenticated) as login_row:
1416
  with gr.Column():
1417
  gr.Markdown("### Login")
@@ -1431,7 +1432,6 @@ with gr.Blocks() as demo:
1431
 
1432
  with gr.Row(visible=authenticated) as main_interface:
1433
  with gr.Column():
1434
- state = gr.State()
1435
  chatbot = gr.Chatbot([], elem_id="RADAR:Channel 94.1", bubble_full_width=False)
1436
  choice = gr.Radio(label="Select Style", choices=["Details", "Conversational"], value="Conversational")
1437
  gr.Markdown("<h1 style='color: red;'>Talk to RADAR</h1>", elem_id="voice-markdown")
@@ -1462,14 +1462,3 @@ with gr.Blocks() as demo:
1462
 
1463
  demo.queue()
1464
  demo.launch(share=True)
1465
-
1466
-
1467
-
1468
-
1469
-
1470
-
1471
-
1472
-
1473
-
1474
-
1475
-
 
1347
  if choice in ["Details", "Conversational"]:
1348
  return gr.update(visible=True), update_map_with_response(history)
1349
  else:
1350
+ return gr.update(visible=False), ""
1351
 
1352
  def generate_audio_elevenlabs(text):
1353
  XI_API_KEY = os.environ['ELEVENLABS_API']
 
1412
  return "Invalid username or password.", gr.update(visible=True), gr.update(visible=False)
1413
 
1414
  with gr.Blocks() as demo:
1415
+ state = gr.State()
1416
  with gr.Row(visible=not authenticated) as login_row:
1417
  with gr.Column():
1418
  gr.Markdown("### Login")
 
1432
 
1433
  with gr.Row(visible=authenticated) as main_interface:
1434
  with gr.Column():
 
1435
  chatbot = gr.Chatbot([], elem_id="RADAR:Channel 94.1", bubble_full_width=False)
1436
  choice = gr.Radio(label="Select Style", choices=["Details", "Conversational"], value="Conversational")
1437
  gr.Markdown("<h1 style='color: red;'>Talk to RADAR</h1>", elem_id="voice-markdown")
 
1462
 
1463
  demo.queue()
1464
  demo.launch(share=True)