hello03 / app.py
Tushar1K's picture
Update app.py
d7ad57b verified
Raw
History Blame Contribute Delete
563 Bytes
import streamlit as st
import os
import google.generativeai as ggi
ggi.configure(api_key=os.environ['AIzaSyCg3KDDSpMZGQnzlFWHAXhr4fBjkc_3uIE'])
model = ggi.GenerativeModel(name='gemini-1.5-flash')
def LLM_Response(question):
response = chat.send_message(question,stream=True)
return response
st.title("Chat Application using Gemini Pro")
user_quest = st.text_input("Ask a questio:")
btn = st.button("Ask")
if btn and user_quest:
result = LLM_Response(user_quest)
st.subheader("Response : ")
for word in result:
st.text(word.text)