Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,18 @@ import streamlit as st
|
|
| 3 |
from huggingface_hub import InferenceApi, login, InferenceClient
|
| 4 |
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
page_bg_img = """
|
| 7 |
<style>
|
| 8 |
.stApp > header { background-color: transparent;}
|
|
@@ -25,18 +37,6 @@ page_bg_img = """
|
|
| 25 |
|
| 26 |
st.markdown(page_bg_img, unsafe_allow_html=True)
|
| 27 |
|
| 28 |
-
# Streamlit app configuration
|
| 29 |
-
st.set_page_config(page_title="Medical Chatbot")
|
| 30 |
-
st.title("Medical Chatbot 🤖")
|
| 31 |
-
st.subheader("", divider='rainbow')
|
| 32 |
-
# Get the Hugging Face token from environment variables
|
| 33 |
-
hf_token = os.getenv("HF_TOKEN")
|
| 34 |
-
if hf_token is None:
|
| 35 |
-
raise ValueError("Hugging Face token not found. Please set the HF_TOKEN environment variable.")
|
| 36 |
-
|
| 37 |
-
# Authenticate with Hugging Face
|
| 38 |
-
login(hf_token)
|
| 39 |
-
|
| 40 |
# Model information and links
|
| 41 |
model_links = {
|
| 42 |
"Zephyr-7B": "HuggingFaceH4/zephyr-7b-beta"
|
|
|
|
| 3 |
from huggingface_hub import InferenceApi, login, InferenceClient
|
| 4 |
|
| 5 |
|
| 6 |
+
# Streamlit app configuration
|
| 7 |
+
st.set_page_config(page_title="Medical Chatbot")
|
| 8 |
+
st.title("Medical Chatbot 🤖")
|
| 9 |
+
st.subheader("", divider='rainbow')
|
| 10 |
+
# Get the Hugging Face token from environment variables
|
| 11 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 12 |
+
if hf_token is None:
|
| 13 |
+
raise ValueError("Hugging Face token not found. Please set the HF_TOKEN environment variable.")
|
| 14 |
+
|
| 15 |
+
# Authenticate with Hugging Face
|
| 16 |
+
login(hf_token)
|
| 17 |
+
|
| 18 |
page_bg_img = """
|
| 19 |
<style>
|
| 20 |
.stApp > header { background-color: transparent;}
|
|
|
|
| 37 |
|
| 38 |
st.markdown(page_bg_img, unsafe_allow_html=True)
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
# Model information and links
|
| 41 |
model_links = {
|
| 42 |
"Zephyr-7B": "HuggingFaceH4/zephyr-7b-beta"
|