Aiswarya Sankar commited on
Commit
297569c
·
1 Parent(s): 8f15867

update file

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -431,8 +431,7 @@ def solveGithubIssue(ticket, history) -> Response:
431
 
432
  history = [[q_display, ""]]
433
  history[-1][1] = ""
434
- chat_history = []
435
- for char in qa({"question": question, "chat_history": chat_history})["answer"]:
436
  history[-1][1] += char
437
  time.sleep(0.01)
438
  yield history
@@ -528,6 +527,7 @@ with gr.Blocks() as demo:
528
 
529
  # return git_ticket_choices.value
530
  # ticketDropdown = gr.Dropdown(choices=git_titles.value, title="Github Issues", visible=False)
 
531
  return gr.Dropdown.update(
532
  choices=git_titles.value
533
  )
@@ -539,8 +539,8 @@ with gr.Blocks() as demo:
539
  # Create the dropdown
540
  # ticket_choices = {git_tickets.value["title"]: ticket for ticket in tickets}
541
  # ticket_titles = [git_tickets.value["title"] for ticket in tickets]
542
- ticketDropdown = gr.Dropdown(choices=[], title="Github Issues")
543
- ticketDropdown.focus(create_ticket_dropdown)
544
  # ingestTickets = gr.Button("Ingest github tickets").click(create_ticket_dropdown, inputs=[], outputs=ticketDropdown) # (fetchGithubIssues).then
545
 
546
  # Extract the ticket title, body for the selected ticket
 
431
 
432
  history = [[q_display, ""]]
433
  history[-1][1] = ""
434
+ for char in qa({"question": question, "chat_history": history})["answer"]:
 
435
  history[-1][1] += char
436
  time.sleep(0.01)
437
  yield history
 
527
 
528
  # return git_ticket_choices.value
529
  # ticketDropdown = gr.Dropdown(choices=git_titles.value, title="Github Issues", visible=False)
530
+ print("IN TICKET DROPDOWN")
531
  return gr.Dropdown.update(
532
  choices=git_titles.value
533
  )
 
539
  # Create the dropdown
540
  # ticket_choices = {git_tickets.value["title"]: ticket for ticket in tickets}
541
  # ticket_titles = [git_tickets.value["title"] for ticket in tickets]
542
+ ticketDropdown = gr.Dropdown(choices=[], title="Github Issues", interactive=True)
543
+ ticketDropdown.focus(create_ticket_dropdown, outputs=ticketDropdown)
544
  # ingestTickets = gr.Button("Ingest github tickets").click(create_ticket_dropdown, inputs=[], outputs=ticketDropdown) # (fetchGithubIssues).then
545
 
546
  # Extract the ticket title, body for the selected ticket