Alshargi commited on
Commit
7faaaba
·
verified ·
1 Parent(s): 8f5a799

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,8 +1,11 @@
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')
 
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')