Grey01 commited on
Commit
35e78cc
1 Parent(s): 34a96ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -38,10 +38,7 @@ if uploaded_file is not None:
38
  text = docx2txt.process(uploaded_file)
39
  # Text input for direct text entry
40
  user_input = st.text_area("Or paste your text here:")
41
- if user_input:
42
- text = user_input
43
- else:
44
- text = text
45
 
46
  def generate_text(model, input_texts, max_length=500, print_time_taken=False):
47
  summary = model.generate(input_texts, max_length=max_length)
 
38
  text = docx2txt.process(uploaded_file)
39
  # Text input for direct text entry
40
  user_input = st.text_area("Or paste your text here:")
41
+ text = user_input if user_input else text # Prioritize user input over file
 
 
 
42
 
43
  def generate_text(model, input_texts, max_length=500, print_time_taken=False):
44
  summary = model.generate(input_texts, max_length=max_length)