Imane Momayiz commited on
Commit
b2e776f
1 Parent(s): d8ad733

feat: updated layout

Browse files
Files changed (2) hide show
  1. app.py +11 -3
  2. src/layout.py +7 -4
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import HfApi, CommitScheduler
4
  from src.components import (
5
  load_data, fetch_sentence, store_submission,
6
  REPO_ID, submissions_folder)
7
- from src.layout import INTRO_TEXT
8
 
9
  # setup
10
  HF_API_KEY = os.environ.get("HF_TOKEN", None)
@@ -19,7 +19,7 @@ scheduler = CommitScheduler(
19
  repo_type="dataset",
20
  folder_path=submissions_folder,
21
  path_in_repo=submissions_folder,
22
- every=1,
23
  )
24
 
25
  # Load the dataset
@@ -35,7 +35,15 @@ if 'translation_input_fr' not in st.session_state:
35
  if 'display_new' not in st.session_state:
36
  st.session_state.display_new = False
37
 
38
- st.title("Translate From Arabic to English")
 
 
 
 
 
 
 
 
39
 
40
  st.markdown(INTRO_TEXT, unsafe_allow_html=True)
41
 
 
4
  from src.components import (
5
  load_data, fetch_sentence, store_submission,
6
  REPO_ID, submissions_folder)
7
+ from src.layout import INTRO_TEXT, DODA_LOGO
8
 
9
  # setup
10
  HF_API_KEY = os.environ.get("HF_TOKEN", None)
 
19
  repo_type="dataset",
20
  folder_path=submissions_folder,
21
  path_in_repo=submissions_folder,
22
+ every=10,
23
  )
24
 
25
  # Load the dataset
 
35
  if 'display_new' not in st.session_state:
36
  st.session_state.display_new = False
37
 
38
+ # Set page config
39
+ st.set_page_config(page_title="DODa",
40
+ page_icon=DODA_LOGO,)
41
+
42
+ # add an image
43
+ st.image(DODA_LOGO, use_column_width=True)
44
+
45
+ # title
46
+ st.title("DODa Labeling App")
47
 
48
  st.markdown(INTRO_TEXT, unsafe_allow_html=True)
49
 
src/layout.py CHANGED
@@ -1,5 +1,8 @@
1
- INTRO_TEXT = """This mini-app allows you to contribute to the **darija-english** dataset
2
- as part of [DODa](https://darija-open-dataset.github.io/)
3
- project. To contribute, simply translate the given sentence from Arabic to English.
 
4
  The translated sentence will be submitted to the dataset
5
- [here](https://huggingface.co/datasets/imomayiz/darija-english)."""
 
 
 
1
+ INTRO_TEXT = """This mini-app allows you to contribute to the **darija-english**
2
+ dataset as part of [DODa](https://darija-open-dataset.github.io/)
3
+ project. \n\n To contribute, simply translate the given sentence from Darija to English
4
+ and/or transcribe to latin characters.
5
  The translated sentence will be submitted to the dataset
6
+ [here](https://huggingface.co/datasets/imomayiz/darija-english)."""
7
+
8
+ DODA_LOGO = "images/doda_logo.png"