Spaces:
Runtime error
Runtime error
File size: 501 Bytes
6ec1d54 cc3affe 80fcb0c 6ec1d54 f1dc53c 6ec1d54 f1dc53c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import streamlit as st
from langchain_google_genai import ChatGoogleGenerativeAI
# Set the app to wide mode
st.set_page_config(layout="wide")
st.title("Gemini ChatBOT")
def llm_response(user_input):
llm = ChatGoogleGenerativeAI(model="gemini-pro")
result = llm.invoke(user_input)
return st.write(result.content)
user_input = st.text_area("Enter your query here...")
if st.button("Get Response") and user_input:
with st.spinner("Generating Response..."):
llm_response(user_input) |