Spaces:
Sleeping
Sleeping
Kushwanth Chowday Kandala
commited on
Commit
·
1d9668c
1
Parent(s):
ab28d5b
update chat app.py
Browse files
app.py
CHANGED
@@ -22,8 +22,10 @@ model = genai.GenerativeModel('gemini-pro')
|
|
22 |
prompt = st.chat_input("Say something")
|
23 |
if prompt:
|
24 |
st.write(f"User has sent the following prompt: {prompt}")
|
|
|
|
|
25 |
response = model.generate_content(prompt)
|
26 |
-
message = st.chat_message("
|
27 |
message.write(response.text)
|
28 |
|
29 |
# # Define a function that will be called when the user clicks the button
|
|
|
22 |
prompt = st.chat_input("Say something")
|
23 |
if prompt:
|
24 |
st.write(f"User has sent the following prompt: {prompt}")
|
25 |
+
else:
|
26 |
+
prompt = "who are you?"
|
27 |
response = model.generate_content(prompt)
|
28 |
+
message = st.chat_message("ai")
|
29 |
message.write(response.text)
|
30 |
|
31 |
# # Define a function that will be called when the user clicks the button
|