YchKhan commited on
Commit
10b4930
·
verified ·
1 Parent(s): a4ad4ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,11 +7,11 @@ def append_text_to_file(text):
7
  with open(file_path, 'r') as file:
8
  new_content = file.read()
9
  print(new_content)
10
- return 5
11
 
12
  with gr.Blocks() as demo:
13
  tb_input = gr.Textbox(label='enter some text')
14
- fi_output = gr.File()
15
  tb_input.submit(append_text_to_file, inputs=tb_input, outputs=fi_output)
16
 
17
  demo.launch(debug=True)
 
7
  with open(file_path, 'r') as file:
8
  new_content = file.read()
9
  print(new_content)
10
+ return file_path
11
 
12
  with gr.Blocks() as demo:
13
  tb_input = gr.Textbox(label='enter some text')
14
+ fi_output = gr.File(type='binary')
15
  tb_input.submit(append_text_to_file, inputs=tb_input, outputs=fi_output)
16
 
17
  demo.launch(debug=True)