wagner-austin commited on
Commit
8fa01fe
·
1 Parent(s): abab9d8

updated requirements to not include gradio. and modified app.py Move custom CSS to Blocks constructor for Gradio compatibility

Browse files
Files changed (3) hide show
  1. app.py +7 -5
  2. env.yml +27 -0
  3. requirements.txt +0 -1
app.py CHANGED
@@ -26,7 +26,12 @@ def transliterate(text, lang, include_arabic, output_format):
26
 
27
 
28
  # Create the Gradio interface
29
- with gr.Blocks(title="Turkic Transliteration Demo") as demo:
 
 
 
 
 
30
  gr.Markdown("# Turkic Transliteration Demo")
31
  gr.Markdown("Enter Cyrillic text for Kazakh (kk) or Kyrgyz (ky) and see the Latin transliteration")
32
 
@@ -107,10 +112,7 @@ with gr.Blocks(title="Turkic Transliteration Demo") as demo:
107
  # Set initial visibility
108
  include_arabic.visible = (output_format.value == "Latin")
109
 
110
- # Custom CSS for the checkbox
111
- demo.load(css="""
112
- #arabic-box { margin-top: 0.25rem; }
113
- """)
114
 
115
  # Launch the app
116
  if __name__ == "__main__":
 
26
 
27
 
28
  # Create the Gradio interface
29
+ with gr.Blocks(
30
+ title="Turkic Transliteration Demo",
31
+ css="""
32
+ #arabic-box { margin-top: 0.25rem; }
33
+ """
34
+ ) as demo:
35
  gr.Markdown("# Turkic Transliteration Demo")
36
  gr.Markdown("Enter Cyrillic text for Kazakh (kk) or Kyrgyz (ky) and see the Latin transliteration")
37
 
 
112
  # Set initial visibility
113
  include_arabic.visible = (output_format.value == "Latin")
114
 
115
+
 
 
 
116
 
117
  # Launch the app
118
  if __name__ == "__main__":
env.yml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: turkic
2
+ channels:
3
+ - conda-forge
4
+ - defaults
5
+ dependencies:
6
+ # ---------- Core binaries ----------
7
+ - python =3.11 # pick 3.10 or 3.11; 3.12 wheels still new
8
+ - icu =73.* # matches PyICU 2.15 wheel
9
+ - sentencepiece >=0.2
10
+ - rapidfuzz >=3.5
11
+ - numpy <2 # required by fasttext-wheel
12
+ # ---------- Build / test ----------
13
+ - pip
14
+ - pytest >=8.0
15
+ - packaging >=23.0 # used in tests
16
+ # ---------- pip-only wheels ----------
17
+ - pip:
18
+ # PyICU is handled differently for Windows vs. other platforms
19
+ # On Windows, we'll use the script/get_pyicu_wheel.py helper
20
+ - pyicu==2.15.2 ; platform_system != "Windows"
21
+ # language ID & vectors
22
+ - fasttext-wheel==0.9.2
23
+ # phoneme & feature extraction
24
+ - epitran==1.26.0
25
+ - git+https://github.com/dmort27/panphon.git@master#egg=panphon
26
+ # editable install of your package
27
+ - -e .
requirements.txt CHANGED
@@ -9,4 +9,3 @@ rich>=13.7
9
  sentencepiece>=0.2.0
10
 
11
  # UI dependencies
12
- gradio==4.31.0
 
9
  sentencepiece>=0.2.0
10
 
11
  # UI dependencies