Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,17 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
x = st.slider('Select a value')
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
# Load the model
|
5 |
+
model = pipeline("text-classification", model="Alshargi/arabic-msa-dialects-segmentation")
|
6 |
+
|
7 |
+
# Slider to select a value
|
8 |
x = st.slider('Select a value')
|
9 |
+
|
10 |
+
# Display the squared value
|
11 |
+
st.write(x, 'squared is', x * x)
|
12 |
+
|
13 |
+
# Make prediction using the loaded model
|
14 |
+
prediction = model(x)
|
15 |
+
|
16 |
+
# Display the prediction
|
17 |
+
st.write("Prediction:", prediction)
|