Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- app.py +3 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from fuzzywuzzy import fuzz
|
| 3 |
-
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from fuzzywuzzy import fuzz
|
| 3 |
+
from indic_transliteration.sanscript import transliterate
|
| 4 |
+
indic_transliteration_language = ['bengali', 'devanagari', 'grantha', 'gujarati', 'gondi_gunjala', 'gurmukhi', 'hk', 'iast', 'iso', 'iso_vedic', 'itrans', 'kannada', 'kolkata_v2', 'malayalam', 'optitrans', 'optitrans_dravidian', 'oriya', 'slp1', 'tamil', 'tamil_subscripted', 'tamil_superscripted', 'telugu', 'titus', 'velthuis', 'wx']
|
| 5 |
+
gr.TabbedInterface([gr.Interface(lambda s1,s2: (fuzz.ratio(s1, s2) , fuzz.partial_ratio(s1, s2) , fuzz.token_sort_ratio(s1, s2) , fuzz.token_set_ratio(s1, s2)),[gr.TextArea(label="Text 1"),gr.TextArea(label="Text 2")],[gr.Textbox(label="Fuzzy Ratio"),gr.Textbox(label="Fuzzy Partial Ratio"),gr.Textbox(label="Fuzzy Token Sort Ratio"),gr.Textbox(label="Fuzzy Token Set Ratio")]),gr.Interface(transliterate,[gr.TextArea(label="Input Text"),gr.Dropdown(indic_transliteration_language,label="Source Language"),gr.Dropdown(indic_transliteration_language,label="Target Language")])],["Fuzzy Matching","Indic Transliteration"]).launch()
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
fuzzywuzzy
|
| 2 |
-
python-Levenshtein
|
|
|
|
|
|
| 1 |
fuzzywuzzy
|
| 2 |
+
python-Levenshtein
|
| 3 |
+
indic-transliteration
|