adan012 commited on
Commit
2aee335
·
verified ·
1 Parent(s): 1caf145

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +1 -1
src/streamlit_app.py CHANGED
@@ -14,7 +14,7 @@ if task == "Text Generation":
14
  prompt = st.text_area("Enter a prompt", "Once upon a time in a land far away,")
15
  if st.button("Generate Text"):
16
  with st.spinner("Generating..."):
17
- generator = pipeline("text-generation", model="openai-community/gpt2", from_tf=True)
18
  output = generator(prompt, max_length=100, num_return_sequences=1)
19
  st.success("Generated Text:")
20
  st.write(output[0]['generated_text'])
 
14
  prompt = st.text_area("Enter a prompt", "Once upon a time in a land far away,")
15
  if st.button("Generate Text"):
16
  with st.spinner("Generating..."):
17
+ generator = pipeline("text-generation", model="gpt2")
18
  output = generator(prompt, max_length=100, num_return_sequences=1)
19
  st.success("Generated Text:")
20
  st.write(output[0]['generated_text'])