Spaces:
Sleeping
Sleeping
Commit ·
8f095bf
1
Parent(s): c152fa0
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def tumor_detection(img, model):
|
|
| 29 |
return "Tumor Detected" if res else "No Tumor"
|
| 30 |
|
| 31 |
# Streamlit App
|
| 32 |
-
st.title("
|
| 33 |
|
| 34 |
# Choose between tasks
|
| 35 |
task = st.radio("Select Task", ("Sentiment Classification", "Tumor Detection"))
|
|
@@ -54,9 +54,9 @@ if task == "Sentiment Classification":
|
|
| 54 |
elif model_option == "DNN":
|
| 55 |
model = load_model('DNN_model.keras')
|
| 56 |
elif model_option == "RNN":
|
| 57 |
-
model = load_model('
|
| 58 |
elif model_option == "LSTM":
|
| 59 |
-
model = load_model('
|
| 60 |
|
| 61 |
if st.button("Classify Sentiment"):
|
| 62 |
result = sentiment_classification(new_review_text, model)
|
|
@@ -69,7 +69,7 @@ elif task == "Tumor Detection":
|
|
| 69 |
|
| 70 |
if uploaded_file is not None:
|
| 71 |
# Load the tumor detection model
|
| 72 |
-
model = load_model('
|
| 73 |
st.image(uploaded_file, caption="Uploaded Image.", use_column_width=False, width=200)
|
| 74 |
st.write("")
|
| 75 |
|
|
|
|
| 29 |
return "Tumor Detected" if res else "No Tumor"
|
| 30 |
|
| 31 |
# Streamlit App
|
| 32 |
+
st.title("Multimodel Prediction")
|
| 33 |
|
| 34 |
# Choose between tasks
|
| 35 |
task = st.radio("Select Task", ("Sentiment Classification", "Tumor Detection"))
|
|
|
|
| 54 |
elif model_option == "DNN":
|
| 55 |
model = load_model('DNN_model.keras')
|
| 56 |
elif model_option == "RNN":
|
| 57 |
+
model = load_model('RN.keras')
|
| 58 |
elif model_option == "LSTM":
|
| 59 |
+
model = load_model('imdb_model.h5')
|
| 60 |
|
| 61 |
if st.button("Classify Sentiment"):
|
| 62 |
result = sentiment_classification(new_review_text, model)
|
|
|
|
| 69 |
|
| 70 |
if uploaded_file is not None:
|
| 71 |
# Load the tumor detection model
|
| 72 |
+
model = load_model('tumor_model.h5')
|
| 73 |
st.image(uploaded_file, caption="Uploaded Image.", use_column_width=False, width=200)
|
| 74 |
st.write("")
|
| 75 |
|