ErnestBeckham commited on
Commit
bf44774
·
1 Parent(s): 8e903ac
Files changed (1) hide show
  1. app.py +0 -20
app.py DELETED
@@ -1,20 +0,0 @@
1
- import streamlit as st
2
- from transformers import pipeline
3
-
4
-
5
- map = {'LABEL_0':'Depression', 'LABEL_1':'Pain', 'LABEL_2':'Anxiety', 'LABEL_3':'Acne', 'LABEL_4':'Birth Control'}
6
-
7
- def main():
8
- st.title("Text Classification App")
9
- review = st.text_area('Enter the review')
10
-
11
- if st.button:
12
- if review:
13
- pipe = pipeline("text-classification", model='ErnestBeckham/gpt-patientconditionclassification', tokenizer='ErnestBeckham/gpt-patientconditionclassification')
14
- label = pipe(review)
15
- st.subheader("Patient's Condition:")
16
- st.write(map[label[0]['label']])
17
-
18
- if __name__ == "__main__":
19
- main()
20
-