izhan001 commited on
Commit
2063d0f
·
verified ·
1 Parent(s): 0dfe733

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -36,11 +36,11 @@ def read_file(file, file_type):
36
  # Function to process the file and generate outputs
37
  def process_file(file, file_type, language="en"):
38
  content = read_file(file, file_type)
39
-
40
  # Check if content is not empty
41
  if not content.strip():
42
  return "Error: The document is empty or unsupported format.", None, None, None, None, None
43
-
44
  # Summarize the content
45
  try:
46
  summary = summarizer(content, max_length=150, min_length=50, do_sample=False)
@@ -99,3 +99,4 @@ iface = gr.Interface(
99
  )
100
 
101
  iface.launch()
 
 
36
  # Function to process the file and generate outputs
37
  def process_file(file, file_type, language="en"):
38
  content = read_file(file, file_type)
39
+
40
  # Check if content is not empty
41
  if not content.strip():
42
  return "Error: The document is empty or unsupported format.", None, None, None, None, None
43
+
44
  # Summarize the content
45
  try:
46
  summary = summarizer(content, max_length=150, min_length=50, do_sample=False)
 
99
  )
100
 
101
  iface.launch()
102
+