ViToSAResearch commited on
Commit
b895dbc
·
verified ·
1 Parent(s): 9fc25be

Update UI button in steamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +7 -14
src/streamlit_app.py CHANGED
@@ -27,13 +27,6 @@ from transformers import (
27
  import torch._dynamo
28
  torch._dynamo.disable()
29
 
30
- # --- Configuration: model paths ---
31
- ASR_MODELS = {
32
- "PhoWhisper": "Huydb/phowhisper-toxic", # ensure this repo has processor_config.json
33
- }
34
- TSD_MODELS = {
35
- "PhoBERT": "Huydb/PhoBERT-toxic",
36
- }
37
 
38
  # --- Load ASR processors & models (cached) ---
39
  @st.cache_resource
@@ -57,13 +50,13 @@ tsd_path = "Huydb/PhoBERT-toxic"
57
  tsd_tokenizer, tsd_model = load_tsd(tsd_path)
58
 
59
  # --- Streamlit UI ---
60
- st.markdown("""
61
- <style> /* CSS animation & button */
62
- @keyframes bgfade {0%{background-color:white;}50%{background-color:#889ECE;}100%{background-color:white;}}
63
- html, body, .reportview-container, .main {height:100%!important; margin:0; padding:0; animation:bgfade 10s ease infinite;}
64
- div.stButton>button:first-child{background-color:red!important;color:white!important;border:none;}
65
- </style>
66
- """, unsafe_allow_html=True)
67
 
68
  st.title("🔊🤬 Toxic Spans Detection from Audio")
69
  uploaded_audio = st.file_uploader("1. Upload a WAV audio file", type=["wav"])
 
27
  import torch._dynamo
28
  torch._dynamo.disable()
29
 
 
 
 
 
 
 
 
30
 
31
  # --- Load ASR processors & models (cached) ---
32
  @st.cache_resource
 
50
  tsd_tokenizer, tsd_model = load_tsd(tsd_path)
51
 
52
  # --- Streamlit UI ---
53
+ # st.markdown("""
54
+ # <style> /* CSS animation & button */
55
+ # @keyframes bgfade {0%{background-color:white;}50%{background-color:#889ECE;}100%{background-color:white;}}
56
+ # html, body, .reportview-container, .main {height:100%!important; margin:0; padding:0; animation:bgfade 10s ease infinite;}
57
+ # div.stButton>button:first-child{background-color:red!important;color:white!important;border:none;}
58
+ # </style>
59
+ # """, unsafe_allow_html=True)
60
 
61
  st.title("🔊🤬 Toxic Spans Detection from Audio")
62
  uploaded_audio = st.file_uploader("1. Upload a WAV audio file", type=["wav"])