astro21 commited on
Commit
ed3964c
1 Parent(s): 5783c60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -37,7 +37,7 @@ def summarize_text(input_text):
37
 
38
  chunk_df = pd.DataFrame({'Chunk Number': range(1, chunk_counter + 1), 'Chunk Length': chunk_lengths})
39
 
40
- return summarized_text, chunk_df, "summarized.txt"
41
 
42
 
43
  def read_file(file):
@@ -53,13 +53,11 @@ def summarize_text_file(file):
53
  return summarize_text(content)
54
 
55
 
56
- input_type = gr.inputs.File("text")
57
 
58
  # Name the outputs using the label parameter and provide a download option
59
  demo = gr.Interface(fn=summarize_text_file, inputs=input_type,
60
- outputs=[gr.Textbox(label="Summarized Text"),
61
- gr.Dataframe(label="Chunk Information", type="pandas"),
62
- gr.File(label="Download Summarized Text", type="file", live=False)],
63
  title = "Text Summarization",
64
  description = "Summarize text using BART",
65
  theme = "huggingface",
 
37
 
38
  chunk_df = pd.DataFrame({'Chunk Number': range(1, chunk_counter + 1), 'Chunk Length': chunk_lengths})
39
 
40
+ return summarized_text
41
 
42
 
43
  def read_file(file):
 
53
  return summarize_text(content)
54
 
55
 
56
+ input_type = gr.TextBox("textbox" , lines = 15)
57
 
58
  # Name the outputs using the label parameter and provide a download option
59
  demo = gr.Interface(fn=summarize_text_file, inputs=input_type,
60
+ outputs=[gr.Textbox(label="Summarized Text")],
 
 
61
  title = "Text Summarization",
62
  description = "Summarize text using BART",
63
  theme = "huggingface",