Imane Momayiz
commited on
Commit
•
665c783
1
Parent(s):
0ecaa8b
fix: new sentence
Browse files
app.py
CHANGED
@@ -42,7 +42,8 @@ def store_submission(api: HfApi, sentence: str, translation: str, translation_fr
|
|
42 |
|
43 |
with open(filename, "w", encoding="utf-8") as f:
|
44 |
f.write(f"darija,eng,darija_ar\n{sentence},{translation},{translation_fr}")
|
45 |
-
|
|
|
46 |
api.upload_folder(
|
47 |
folder_path=folder_path,
|
48 |
path_in_repo=folder_path,
|
@@ -122,12 +123,11 @@ def main():
|
|
122 |
if not translation_input and translation_input_fr:
|
123 |
st.warning("Please enter a translation before submitting.")
|
124 |
else:
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
)
|
131 |
|
132 |
if __name__ == "__main__":
|
133 |
main()
|
|
|
42 |
|
43 |
with open(filename, "w", encoding="utf-8") as f:
|
44 |
f.write(f"darija,eng,darija_ar\n{sentence},{translation},{translation_fr}")
|
45 |
+
|
46 |
+
print(REPO_ID)
|
47 |
api.upload_folder(
|
48 |
folder_path=folder_path,
|
49 |
path_in_repo=folder_path,
|
|
|
123 |
if not translation_input and translation_input_fr:
|
124 |
st.warning("Please enter a translation before submitting.")
|
125 |
else:
|
126 |
+
store_submission(api,
|
127 |
+
st.session_state.sentence,
|
128 |
+
st.session_state.translation_input,
|
129 |
+
st.session_state.translation_input_fr
|
130 |
+
)
|
|
|
131 |
|
132 |
if __name__ == "__main__":
|
133 |
main()
|