Aiswarya Sankar commited on
Commit
11f2322
·
1 Parent(s): f3792e6

update file

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -526,10 +526,11 @@ with gr.Blocks() as demo:
526
  # ticket_choices = {git_tickets.value["title"]: ticket for ticket in tickets}
527
  # ticket_titles = [git_tickets.value["title"] for ticket in tickets]
528
 
529
- # return ticket_choices, ticket_titles
 
530
  return gr.Dropdown.update(
531
  choices=git_titles.value, value=git_titles.value[0]
532
- ), gr.update(visible=True)
533
 
534
  # global ticket_choices, ticket_titles, tickets
535
  # repo = "/".join(repo_name.value[:-4].split("/")[-2:])
@@ -538,8 +539,8 @@ with gr.Blocks() as demo:
538
  # Create the dropdown
539
  # ticket_choices = {git_tickets.value["title"]: ticket for ticket in tickets}
540
  # ticket_titles = [git_tickets.value["title"] for ticket in tickets]
541
- ticketDropdown = gr.Dropdown(choices=git_titles.value, title="Github Issues", visible=False)
542
- ingestTickets = gr.Button("Ingest github tickets").click(fetchGithubIssues).then(create_ticket_dropdown, inputs=[], outputs=[ticketDropdown])
543
 
544
 
545
  # Extract the ticket title, body for the selected ticket
 
526
  # ticket_choices = {git_tickets.value["title"]: ticket for ticket in tickets}
527
  # ticket_titles = [git_tickets.value["title"] for ticket in tickets]
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, value=git_titles.value[0]
533
+ )
534
 
535
  # global ticket_choices, ticket_titles, tickets
536
  # repo = "/".join(repo_name.value[:-4].split("/")[-2:])
 
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=create_ticket_dropdown(), title="Github Issues", visible=False)
543
+ ingestTickets = gr.Button("Ingest github tickets").click(fetchGithubIssues).then(create_ticket_dropdown, inputs=[], outputs=ticketDropdown)
544
 
545
 
546
  # Extract the ticket title, body for the selected ticket