Alshargi commited on
Commit
1f97e75
·
verified ·
1 Parent(s): 958fa20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -1,4 +1,17 @@
1
  import streamlit as st
 
2
 
 
 
 
 
3
  x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
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)