Spaces:
Runtime error
Runtime error
import streamlit as st | |
import json | |
import google.generativeai as genai | |
GOOGLE_API_KEY="AIzaSyCwSszcd45k1Ce0B48oiQnYPRdTLh49kg8" | |
genai.configure(api_key=GOOGLE_API_KEY) | |
model = genai.GenerativeModel('gemini-pro') | |
if prompt := st.chat_input("Hi , what can I do for you "): | |
enprom = f""" | |
Act as a personal assistant, Understand user intent from the point of view for asking a few questions. ask to know more details about {prompt} | |
:- {prompt}""" | |
completetion = model.generate_content(enprom) | |
with st.chat_message("Assistant"): | |
st.write(completetion.text) | |