astro21 commited on
Commit
d379fcc
·
1 Parent(s): fb47e39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -26,15 +26,15 @@ def summarize_text(input_text):
26
  summarized_text = "\n".join(summarized_chunks)
27
  return summarized_text
28
 
29
- def read_file(file_path):
30
- with open(file_path, 'r') as file:
31
- content = file.read()
32
  return content
33
 
34
 
35
  def summarize_text_file(file):
36
  if file is not None:
37
- content = read_file(file.name)
38
  return summarize_text(content)
39
 
40
  input_type = gr.inputs.File("text")
 
26
  summarized_text = "\n".join(summarized_chunks)
27
  return summarized_text
28
 
29
+ def read_file(file):
30
+ with open(file.name, 'r') as file_:
31
+ content = file_.read()
32
  return content
33
 
34
 
35
  def summarize_text_file(file):
36
  if file is not None:
37
+ content = read_file(file)
38
  return summarize_text(content)
39
 
40
  input_type = gr.inputs.File("text")