awacke1 commited on
Commit
24be11a
1 Parent(s): c08ef85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import altair as alt
3
  import torch
4
  from transformers import AlbertTokenizer, AlbertForSequenceClassification
5
  import sentencepiece as spm
 
6
 
7
  # Load pre-trained model and tokenizer
8
  model_name = "albert-base-v2"
@@ -21,7 +22,9 @@ def classify_text(text):
21
  st.title("ALBERT Text Classification App")
22
 
23
  # Create input box for user to enter text
24
- text_input = st.text_area("Enter text to classify", height=200)
 
 
25
 
26
  # Classify input text and display results
27
  if st.button("Classify"):
 
3
  import torch
4
  from transformers import AlbertTokenizer, AlbertForSequenceClassification
5
  import sentencepiece as spm
6
+ import pandas as pd
7
 
8
  # Load pre-trained model and tokenizer
9
  model_name = "albert-base-v2"
 
22
  st.title("ALBERT Text Classification App")
23
 
24
  # Create input box for user to enter text
25
+ default_text = "Streamlit-Altair: A component that allows the creation of Altair visualizations within Streamlit.\nStreamlit-Bokeh: A component that allows the creation of Bokeh visualizations within Streamlit.\nStreamlit-Plotly: A component that allows the creation of Plotly visualizations within Streamlit.\nStreamlit-Mapbox: A component that allows the creation of Mapbox maps within Streamlit.\nStreamlit-DeckGL: A component that allows the creation of Deck.GL visualizations within Streamlit.\nStreamlit-Wordcloud: A component that allows the creation of word clouds within Streamlit.\nStreamlit-Audio: A component that allows the playing of audio files within Streamlit.\nStreamlit-Video: A component that allows the playing of video files within Streamlit.\nStreamlit-EmbedCode: A component that allows the embedding of code snippets within Streamlit.\nStreamlit-Components: A component that provides a library of custom Streamlit components created by the Streamlit community."
26
+ text_input = st.text_area("Enter text to classify", default_text, height=200)
27
+
28
 
29
  # Classify input text and display results
30
  if st.button("Classify"):