Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ def detect_language(text: str, model_label: str, progress=gr.Progress()):
|
|
| 77 |
if not text or not text.strip():
|
| 78 |
return "Please enter some text."
|
| 79 |
|
| 80 |
-
progress(0.2, desc=
|
| 81 |
try:
|
| 82 |
pipe = get_pipeline(model_label)
|
| 83 |
except Exception as e:
|
|
@@ -129,7 +129,7 @@ def compare_all(text: str, progress=gr.Progress()):
|
|
| 129 |
return "\n\n".join(sections)
|
| 130 |
|
| 131 |
|
| 132 |
-
with gr.Blocks(
|
| 133 |
gr.Markdown("""
|
| 134 |
# 🇳🇬 Nigerian & Multilingual Language Identifier
|
| 135 |
All language-identification models by [olaverse](https://huggingface.co/olaverse), in one Space.
|
|
@@ -194,4 +194,4 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 194 |
""")
|
| 195 |
|
| 196 |
if __name__ == "__main__":
|
| 197 |
-
demo.launch()
|
|
|
|
| 77 |
if not text or not text.strip():
|
| 78 |
return "Please enter some text."
|
| 79 |
|
| 80 |
+
progress(0.2, desc="Running..." if _CACHED_LABEL == model_label else f"Loading {model_label}...")
|
| 81 |
try:
|
| 82 |
pipe = get_pipeline(model_label)
|
| 83 |
except Exception as e:
|
|
|
|
| 129 |
return "\n\n".join(sections)
|
| 130 |
|
| 131 |
|
| 132 |
+
with gr.Blocks() as demo:
|
| 133 |
gr.Markdown("""
|
| 134 |
# 🇳🇬 Nigerian & Multilingual Language Identifier
|
| 135 |
All language-identification models by [olaverse](https://huggingface.co/olaverse), in one Space.
|
|
|
|
| 194 |
""")
|
| 195 |
|
| 196 |
if __name__ == "__main__":
|
| 197 |
+
demo.launch(theme=gr.themes.Soft())
|