File size: 1,154 Bytes
f1f2665 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
from traning_zone.classe_prediction.prediction_classe import *
import streamlit as st
import plotly.express as px
import warnings
warnings.filterwarnings("ignore")
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
sns.set(rc={'figure.figsize':(14.7,10.27)})
st.title("Classification")
inputs = st.text_input("Input :" , value= "150ML SECHE VERNIS VITRY", key = "input")
if inputs != None :
X = pd.DataFrame({"X" : [inputs]})
X = X.X
pred = PredictionV(X)
data = pred.prediction("spacy_spacy")
"Input : ", data.item_desc[0]
"Pred hyper class : "
names = list(data["hyper classe"][0].keys())
values = list(data["hyper classe"][0].values())
df = pd.DataFrame({"class_desc_fr": names, "score": values})
fig = px.histogram(df, y = "class_desc_fr", x = "score", orientation="h")
st.plotly_chart(fig)
"Pred classe : "
names = list(data.classe[0].keys())
values = list(data.classe[0].values())
df = pd.DataFrame({"class_desc_fr": names, "score": values})
fig = px.histogram(df, y = "class_desc_fr", x = "score", orientation="h")
st.plotly_chart(fig)
|