Download src/streamlit_app.py from Reza110/chatBot: direct link, hf CLI and curl.
- Browser
- Download file 322 Bytes
-
https://huggingface.co/spaces/Reza110/chatBot/resolve/main/src/streamlit_app.py
- Command line
-
hf download hf://spaces/Reza110/chatBot/src/streamlit_app.py
-
curl -L -o streamlit_app.py https://huggingface.co/spaces/Reza110/chatBot/resolve/main/src/streamlit_app.py
322 Bytes
| import streamlit as st | |
| from langchain_google_genai import ChatGoogleGenerativeAI | |
| st.title("Google ChatBot") | |
| llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash-latest", api_key="AIzaSyDA1zZ006f4krgUDjhdju_RcwZNwNPOJwI") | |
| prompt = st.text_input("prompt: ") | |
| query = llm.invoke(prompt) | |
| if query: | |
| st.write(query.content) | |