Kushwanth Chowday Kandala commited on
Commit
1296ca3
·
1 Parent(s): 49f8af7

update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -16,9 +16,14 @@ import google.generativeai as genai
16
  genai.configure(api_key = gemini_api_key)
17
 
18
  model = genai.GenerativeModel('gemini-pro')
19
- response = model.generate_content("What is the meaning of life?")
20
 
21
- st.text(response.text)
 
 
 
 
 
 
22
 
23
  # Define a function that will be called when the user clicks the button
24
  def greet_user():
 
16
  genai.configure(api_key = gemini_api_key)
17
 
18
  model = genai.GenerativeModel('gemini-pro')
 
19
 
20
+
21
+
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
+ st.chat_message(response.text)
27
 
28
  # Define a function that will be called when the user clicks the button
29
  def greet_user():