Spaces:
Sleeping
Sleeping
fix: Extract string value from prediction array
Browse files- frontend/app.py +1 -1
frontend/app.py
CHANGED
@@ -189,7 +189,7 @@ else:
|
|
189 |
symptoms_vectorized = st.session_state.vectorizer.transform([preprocessed_symptoms])
|
190 |
# Use the loaded model for prediction
|
191 |
prediction = st.session_state.model_llm.predict(symptoms_vectorized) # Use the model, not the array
|
192 |
-
return prediction[0]
|
193 |
else:
|
194 |
st.error("Unable to make prediction. Vectorizer or LLM model is not loaded.")
|
195 |
return None
|
|
|
189 |
symptoms_vectorized = st.session_state.vectorizer.transform([preprocessed_symptoms])
|
190 |
# Use the loaded model for prediction
|
191 |
prediction = st.session_state.model_llm.predict(symptoms_vectorized) # Use the model, not the array
|
192 |
+
return prediction[0] # Extract the string value from the array
|
193 |
else:
|
194 |
st.error("Unable to make prediction. Vectorizer or LLM model is not loaded.")
|
195 |
return None
|