Download app.py from Poonawala/Chatbot: direct link, hf CLI and curl.
- Browser
- Download file 508 Bytes
-
https://huggingface.co/spaces/Poonawala/Chatbot/resolve/main/app.py
- Command line
-
hf download hf://spaces/Poonawala/Chatbot/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Poonawala/Chatbot/resolve/main/app.py
508 Bytes
| import streamlit as st | |
| from llm_chain import ask_ai | |
| st.title("Poonawala: Medi 🤖|🩺") | |
| llm_name = st.radio( | |
| "Choose your Model", | |
| ["4o", "4o-mini"], | |
| ) | |
| def generate_response(input_text): | |
| st.info(ask_ai( | |
| query=input_text, | |
| model_name=llm_name | |
| ) | |
| ) | |
| with st.form("my_form"): | |
| text = st.text_area("Enter text:", "What your duties as a doctor?") | |
| submitted = st.form_submit_button("Submit") | |
| if submitted: | |
| generate_response(text) |