Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ def show_f(repo,name,token):
|
|
| 52 |
f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="space"))
|
| 53 |
print (f_ist)
|
| 54 |
|
| 55 |
-
return(gr.Dropdown.update(label="Spaces", choices=[f for f in f_ist]))
|
| 56 |
|
| 57 |
|
| 58 |
|
|
@@ -170,13 +170,13 @@ with gr.Blocks() as build:
|
|
| 170 |
with gr.Row():
|
| 171 |
r_t=gr.Textbox(max_lines=100)
|
| 172 |
m_t=gr.Textbox(max_lines=100)
|
| 173 |
-
au=gr.Textbox(visible=
|
| 174 |
uu=gr.Textbox(visible=False)
|
| 175 |
|
| 176 |
def cyc(x):
|
| 177 |
return x,None
|
| 178 |
|
| 179 |
-
f_btn.click(get_f,[r_name,
|
| 180 |
r_t.change(cyc,r_t,[m_t,files])
|
| 181 |
|
| 182 |
s_btn.click(show_s,r_name,[s_name,au])
|
|
|
|
| 52 |
f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="space"))
|
| 53 |
print (f_ist)
|
| 54 |
|
| 55 |
+
return(gr.Dropdown.update(label="Spaces", choices=[f for f in f_ist],multiselect=True))
|
| 56 |
|
| 57 |
|
| 58 |
|
|
|
|
| 170 |
with gr.Row():
|
| 171 |
r_t=gr.Textbox(max_lines=100)
|
| 172 |
m_t=gr.Textbox(max_lines=100)
|
| 173 |
+
au=gr.Textbox(visible=False)
|
| 174 |
uu=gr.Textbox(visible=False)
|
| 175 |
|
| 176 |
def cyc(x):
|
| 177 |
return x,None
|
| 178 |
|
| 179 |
+
f_btn.click(get_f,[r_name,s_name,token],None)
|
| 180 |
r_t.change(cyc,r_t,[m_t,files])
|
| 181 |
|
| 182 |
s_btn.click(show_s,r_name,[s_name,au])
|