Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,8 @@ def toggle_visibility(input_type):
|
|
42 |
user_input_visible = input_type == "Text Input"
|
43 |
file_upload_visible = input_type == "File Upload"
|
44 |
return gr.update(visible=user_input_visible), gr.update(visible=file_upload_visible)
|
45 |
-
|
|
|
46 |
def clean_tmp_directory():
|
47 |
# Allow 20 user keys to be stored.
|
48 |
# Once that limitation is reached, deleted the oldest.
|
@@ -289,8 +290,7 @@ with demo:
|
|
289 |
text = gr.Textbox(label="Enter some words:",visible=False,value="The Employee is entitled to two weeks of paid vacation annually, to be scheduled at the mutual convenience of the Employee and Employer.")
|
290 |
|
291 |
file_upload = gr.File(label="Upload File", file_types=[".txt"], visible=False) # Initially hidden
|
292 |
-
input_type.change(toggle_visibility, inputs=input_type, outputs=[
|
293 |
-
text = gr.Textbox(label="Enter some words:", value="The Employee is entitled to two weeks of paid vacation annually, to be scheduled at the mutual convenience of the Employee and Employer.")
|
294 |
gr.Markdown(
|
295 |
"""
|
296 |
<hr/>
|
|
|
42 |
user_input_visible = input_type == "Text Input"
|
43 |
file_upload_visible = input_type == "File Upload"
|
44 |
return gr.update(visible=user_input_visible), gr.update(visible=file_upload_visible)
|
45 |
+
|
46 |
+
|
47 |
def clean_tmp_directory():
|
48 |
# Allow 20 user keys to be stored.
|
49 |
# Once that limitation is reached, deleted the oldest.
|
|
|
290 |
text = gr.Textbox(label="Enter some words:",visible=False,value="The Employee is entitled to two weeks of paid vacation annually, to be scheduled at the mutual convenience of the Employee and Employer.")
|
291 |
|
292 |
file_upload = gr.File(label="Upload File", file_types=[".txt"], visible=False) # Initially hidden
|
293 |
+
input_type.change(toggle_visibility, inputs=input_type, outputs=[text, file_upload])
|
|
|
294 |
gr.Markdown(
|
295 |
"""
|
296 |
<hr/>
|