iappleby commited on
Commit
4d2d776
·
verified ·
1 Parent(s): 8bd900c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -1,4 +1,19 @@
1
  import streamlit as st
 
2
 
3
- st.title("My Streamlit App on Hugging Face")
4
- st.write("Hello, this is a simple Streamlit app deployed on Hugging Face!")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ from transformers import pipeline
3
 
4
+ # Load the model
5
+ st.title("PatientSeek AI Model")
6
+ st.write("This app uses the PatientSeek model for medical predictions.")
7
+
8
+ @st.cache_resource # Cache to speed up loading
9
+ def load_model():
10
+ return pipeline("text-classification", model="whyhow-ai/PatientSeek")
11
+
12
+ model = load_model()
13
+
14
+ # User input
15
+ user_input = st.text_area("Enter patient symptoms:")
16
+
17
+ if user_input:
18
+ result = model(user_input)
19
+ st.write("Prediction:", result)