Add: Conette version, paper link and github link on the bottom of the page.
Browse files
app.py
CHANGED
|
@@ -9,13 +9,12 @@ from typing import Any, Optional, Union
|
|
| 9 |
import streamlit as st
|
| 10 |
import torchaudio
|
| 11 |
|
|
|
|
|
|
|
| 12 |
from st_audiorec import st_audiorec
|
| 13 |
from streamlit.runtime.uploaded_file_manager import UploadedFile
|
| 14 |
from torch import Tensor
|
| 15 |
|
| 16 |
-
from conette import CoNeTTEModel, conette
|
| 17 |
-
from conette.utils.collections import dict_list_to_list_dict
|
| 18 |
-
|
| 19 |
|
| 20 |
ALLOW_REP_MODES = ("stopwords", "all", "none")
|
| 21 |
DEFAULT_TASK = "audiocaps"
|
|
@@ -281,6 +280,11 @@ def main() -> None:
|
|
| 281 |
if isinstance(key, str) and key.startswith(HASH_PREFIX):
|
| 282 |
del st.session_state[key]
|
| 283 |
st.session_state["last_generation"] = current
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
|
| 285 |
|
| 286 |
if __name__ == "__main__":
|
|
|
|
| 9 |
import streamlit as st
|
| 10 |
import torchaudio
|
| 11 |
|
| 12 |
+
from conette import CoNeTTEModel, conette, __version__
|
| 13 |
+
from conette.utils.collections import dict_list_to_list_dict
|
| 14 |
from st_audiorec import st_audiorec
|
| 15 |
from streamlit.runtime.uploaded_file_manager import UploadedFile
|
| 16 |
from torch import Tensor
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
ALLOW_REP_MODES = ("stopwords", "all", "none")
|
| 20 |
DEFAULT_TASK = "audiocaps"
|
|
|
|
| 280 |
if isinstance(key, str) and key.startswith(HASH_PREFIX):
|
| 281 |
del st.session_state[key]
|
| 282 |
st.session_state["last_generation"] = current
|
| 283 |
+
|
| 284 |
+
content = f"""CoNeTTE version {__version__}. <a href="https://github.com/Labbeti/conette-audio-captioning/">Source code on GitHub</a>. <a href="https://ieeexplore.ieee.org/document/10603439">Academic Paper</a>."""
|
| 285 |
+
st.divider()
|
| 286 |
+
st.markdown(content, unsafe_allow_html=True)
|
| 287 |
+
|
| 288 |
|
| 289 |
|
| 290 |
if __name__ == "__main__":
|