Spaces:
Runtime error
Runtime error
Commit
·
54385f0
1
Parent(s):
cb72eb7
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import os
|
|
2 |
import streamlit as st
|
3 |
from google.generativeai import GenerativeModel
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
|
8 |
# Create chatbot interface
|
9 |
st.title("Gemini API Chatbot")
|
@@ -23,7 +23,7 @@ if user_input:
|
|
23 |
st.markdown(f"**You:** {user_input}")
|
24 |
|
25 |
# Create model object
|
26 |
-
model = GenerativeModel(model_name="gemini-pro")
|
27 |
|
28 |
# Get model response with generate_content method
|
29 |
with st.spinner("Thinking..."):
|
|
|
2 |
import streamlit as st
|
3 |
from google.generativeai import GenerativeModel
|
4 |
|
5 |
+
# API key
|
6 |
+
api_key = "AIzaSyC70u1sN87IkoxOoIj4XCAPw97ae2LZwNM"
|
7 |
|
8 |
# Create chatbot interface
|
9 |
st.title("Gemini API Chatbot")
|
|
|
23 |
st.markdown(f"**You:** {user_input}")
|
24 |
|
25 |
# Create model object
|
26 |
+
model = GenerativeModel(model_name="gemini-pro", api_key=api_key)
|
27 |
|
28 |
# Get model response with generate_content method
|
29 |
with st.spinner("Thinking..."):
|