Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ attack_strength = st.sidebar.slider("Attack Strength", 0.0, 0.9, 0.1)
|
|
| 39 |
# ================================
|
| 40 |
# 4๏ธโฃ Streamlit ASR Web App (Fast Decoding & Security Features)
|
| 41 |
# ================================
|
| 42 |
-
st.title("๐๏ธ Speech-to-Text ASR Model with Security Features ๐ถ")
|
| 43 |
|
| 44 |
audio_file = st.file_uploader("Upload an audio file", type=["wav", "mp3", "flac"])
|
| 45 |
|
|
@@ -63,7 +63,7 @@ if audio_file:
|
|
| 63 |
predicted_ids = torch.argmax(logits, dim=-1)
|
| 64 |
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
|
| 65 |
|
| 66 |
-
if attack_strength > 0.
|
| 67 |
st.warning("โ ๏ธ Adversarial attack detected! Transcription may be affected.")
|
| 68 |
|
| 69 |
st.success("๐ Secure Transcription:")
|
|
|
|
| 39 |
# ================================
|
| 40 |
# 4๏ธโฃ Streamlit ASR Web App (Fast Decoding & Security Features)
|
| 41 |
# ================================
|
| 42 |
+
st.title("๐๏ธ Speech-to-Text ASR Conformer Model Finetunned on Libri Speech with Security Features ๐ถ")
|
| 43 |
|
| 44 |
audio_file = st.file_uploader("Upload an audio file", type=["wav", "mp3", "flac"])
|
| 45 |
|
|
|
|
| 63 |
predicted_ids = torch.argmax(logits, dim=-1)
|
| 64 |
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
|
| 65 |
|
| 66 |
+
if attack_strength > 0.2:
|
| 67 |
st.warning("โ ๏ธ Adversarial attack detected! Transcription may be affected.")
|
| 68 |
|
| 69 |
st.success("๐ Secure Transcription:")
|