Spaces:
Runtime error
Runtime error
Download app.py from thisisdev/SimpleChatBotApplication: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/thisisdev/SimpleChatBotApplication/resolve/db1effec4318d795433b5e66351d7c2a734cdf52/app.py
- Command line
-
hf download hf://spaces/thisisdev/SimpleChatBotApplication@db1effec4318d795433b5e66351d7c2a734cdf52/app.py
-
curl -L -o app.py https://huggingface.co/spaces/thisisdev/SimpleChatBotApplication/resolve/db1effec4318d795433b5e66351d7c2a734cdf52/app.py
577 Bytes
| # Generics | |
| import os | |
| import keyfile | |
| import warnings | |
| import streamlit as st | |
| warnings.filterwarnings("ignore") | |
| # Langchain packages | |
| from langchain_google_genai import ChatGoogleGenerativeAI | |
| from langchain.schema import HumanMessage, SystemMessage, AIMessage | |
| # First message that will pop on the screen | |
| st.set_page_config(page_title = "Magical Healer") | |
| st.header("Welcome, What help do you need?") | |
| # Configuring the key | |
| os.environ["GOOGLE_API_KEY"] = keyfile.GOOGLEKEY | |
| # User message | |
| def get_text(): | |
| input_text = st.text_input("You: ", key = input) | |
| return input_text | |