Madhuri123 commited on
Commit
ae673f7
·
verified ·
1 Parent(s): 5a8c758

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -22,7 +22,14 @@ if st.button("Generate Text"):
22
  if user_input:
23
  with st.spinner(f"Generating text using {model_id}..."):
24
  # Perform inference using the selected model
25
- response = client.text_generation(user_input)
 
 
 
 
 
 
 
26
  st.success("Text generated!")
27
  st.write(response)
28
  else:
 
22
  if user_input:
23
  with st.spinner(f"Generating text using {model_id}..."):
24
  # Perform inference using the selected model
25
+ response = client.text_generation(model=
26
+ messages=[
27
+ {"role": "system", "content": "You are a question answering assistant."},
28
+ {"role": "user", "content": prompt1}
29
+ ],
30
+ max_tokens=500,
31
+ stream=False,
32
+ ))
33
  st.success("Text generated!")
34
  st.write(response)
35
  else: