Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
-
from transformers import pipeline
|
3 |
|
4 |
-
# Load the model
|
5 |
-
|
|
|
|
|
|
|
6 |
|
7 |
# Slider to select a value
|
8 |
x = st.slider('Select a value')
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import pipeline, AutoConfig
|
3 |
|
4 |
+
# Load the model configuration from config.json
|
5 |
+
config = AutoConfig.from_pretrained("Alshargi/arabic-msa-dialects-segmentation")
|
6 |
+
|
7 |
+
# Load the model using the configuration
|
8 |
+
model = pipeline("text-classification", model="Alshargi/arabic-msa-dialects-segmentation", config=config)
|
9 |
|
10 |
# Slider to select a value
|
11 |
x = st.slider('Select a value')
|