mbuuck commited on
Commit
7e8fa36
·
1 Parent(s): b3a5aeb

Set default project

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -37,7 +37,8 @@ with gr.Blocks() as demo:
37
  projects = dq.list_projects_by_author(author_id=username)
38
  # Initialize the first project in the list
39
  project_names = projects['name'].tolist()
40
- return gr.Dropdown.update(choices=project_names)
 
41
 
42
  # Change the project name in the index generator object when the
43
  # user selects a new project
 
37
  projects = dq.list_projects_by_author(author_id=username)
38
  # Initialize the first project in the list
39
  project_names = projects['name'].tolist()
40
+ default_project = project_names[0]
41
+ return gr.Dropdown.update(choices=project_names, value=default_project)
42
 
43
  # Change the project name in the index generator object when the
44
  # user selects a new project