spedrox-sac commited on
Commit
aed89f4
1 Parent(s): 14ecb63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,16 +10,16 @@ pipe = pipeline(
10
  )
11
 
12
  # Streamlit app
13
- st.title("Optimized Text Generation with Qwen Model")
14
 
15
  # Text input from the user
16
- user_input = st.text_input("Enter your message:", "Who are you?")
17
 
18
  # Generate text when the button is clicked
19
  if st.button("Generate"):
20
  messages = [{"role": "user", "content": user_input}]
21
  # Reduce max_new_tokens for faster generation
22
- output = pipe(messages, max_new_tokens=30) # Adjust as needed for speed
23
  generated_text = output[0]['generated_text']
24
 
25
  # Display the generated text
 
10
  )
11
 
12
  # Streamlit app
13
+ st.title("Qwen Model Chat")
14
 
15
  # Text input from the user
16
+ user_input = st.text_input("Enter your message:", "Delete this and write your query?")
17
 
18
  # Generate text when the button is clicked
19
  if st.button("Generate"):
20
  messages = [{"role": "user", "content": user_input}]
21
  # Reduce max_new_tokens for faster generation
22
+ output = pipe(messages, max_new_tokens=150) # Adjust as needed for speed
23
  generated_text = output[0]['generated_text']
24
 
25
  # Display the generated text