Grey01 commited on
Commit
fe48816
1 Parent(s): fab6373

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -31,7 +31,10 @@ if uploaded_file is not None:
31
  text = docx2txt.process(uploaded_file)
32
  # Text input for direct text entry
33
  user_input = st.text_area("Or paste your text here:")
34
- text.append(user_input) if user_input else text.append(text) # Prioritize user input over file
 
 
 
35
 
36
  def generate_text(model, input_texts, max_length=500, print_time_taken=False):
37
  # Convert input_texts to a list if it's a Dataset
@@ -50,4 +53,4 @@ generated_summaries = generate_text(
50
  text, # Pass the list of documents directly
51
  )
52
  st.subheader("Generated Summary:")
53
- st.write(summary)
 
31
  text = docx2txt.process(uploaded_file)
32
  # Text input for direct text entry
33
  user_input = st.text_area("Or paste your text here:")
34
+ if user_input:
35
+ text.append(user_input)
36
+ else:
37
+ text.append(text) # Prioritize user input over file
38
 
39
  def generate_text(model, input_texts, max_length=500, print_time_taken=False):
40
  # Convert input_texts to a list if it's a Dataset
 
53
  text, # Pass the list of documents directly
54
  )
55
  st.subheader("Generated Summary:")
56
+ st.write(generated_summaries)