ziyadsuper2017 commited on
Commit
ae52996
·
1 Parent(s): e4e897b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -77,12 +77,12 @@ if user_input:
77
  # Display user message with markdown
78
  st.markdown(f"**You:** {user_input}")
79
 
80
- # Get model response with generate_content method```
81
  with st.spinner("Thinking..."):
82
  response = model.generate_content(chat_history)
83
 
84
  # Get response text from response object
85
- response_text = response.result.text
86
 
87
  # Add response message to chat history
88
  chat_history.append({"role": "assistant", "parts": [{"text": response_text}]})
 
77
  # Display user message with markdown
78
  st.markdown(f"**You:** {user_input}")
79
 
80
+ # Get model response with generate_content method
81
  with st.spinner("Thinking..."):
82
  response = model.generate_content(chat_history)
83
 
84
  # Get response text from response object
85
+ response_text = response.text
86
 
87
  # Add response message to chat history
88
  chat_history.append({"role": "assistant", "parts": [{"text": response_text}]})