xp3857 commited on
Commit
e08238f
·
1 Parent(s): f303820

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -37,7 +37,10 @@ def repl(rs,rt,uu):
37
  r_file = file.read()
38
  r_file = r_file.replace(f'{rs}',f'{rt}')
39
  o_file = open(f'mod_{uu}','w')
40
- return r_file, f'{uu}'
 
 
 
41
 
42
 
43
 
@@ -108,8 +111,8 @@ with gr.Blocks() as build:
108
  with gr.Column():
109
  inbut = gr.Button()
110
  output_html = gr.HTML("""""")
111
- files=gr.File()
112
  gr.Column(scale=1)
 
113
  with gr.Row():
114
  r_t=gr.Textbox(max_lines=100)
115
  m_t=gr.Textbox(max_lines=100)
 
37
  r_file = file.read()
38
  r_file = r_file.replace(f'{rs}',f'{rt}')
39
  o_file = open(f'mod_{uu}','w')
40
+ o_file = o_file.writelines(r_file)
41
+ file.close()
42
+ o_file.close()
43
+ return r_file, f'{o_file}'
44
 
45
 
46
 
 
111
  with gr.Column():
112
  inbut = gr.Button()
113
  output_html = gr.HTML("""""")
 
114
  gr.Column(scale=1)
115
+ files=gr.File()
116
  with gr.Row():
117
  r_t=gr.Textbox(max_lines=100)
118
  m_t=gr.Textbox(max_lines=100)