Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -275,6 +275,21 @@ class LuhyaTranslationInterface:
|
|
| 275 |
|
| 276 |
return demo
|
| 277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
# ================================================================
|
| 279 |
# FOR HUGGINGFACE SPACES DEPLOYMENT
|
| 280 |
# ================================================================
|
|
@@ -297,4 +312,4 @@ if __name__ == "__main__":
|
|
| 297 |
show_error=True, # Show errors in interface
|
| 298 |
show_tips=True, # Show Gradio tips
|
| 299 |
enable_queue=True # Enable queueing for better performance
|
| 300 |
-
)
|
|
|
|
| 275 |
|
| 276 |
return demo
|
| 277 |
|
| 278 |
+
# ================================================================
|
| 279 |
+
# STANDALONE GRADIO APP
|
| 280 |
+
# ================================================================
|
| 281 |
+
|
| 282 |
+
def create_luhya_translator_app(model_name: str = "your-username/luhya-multilingual-m2m100"):
|
| 283 |
+
"""Create and launch the Luhya translation app"""
|
| 284 |
+
|
| 285 |
+
# Initialize the interface
|
| 286 |
+
translator = LuhyaTranslationInterface(model_name)
|
| 287 |
+
|
| 288 |
+
# Create the Gradio interface
|
| 289 |
+
demo = translator.create_interface()
|
| 290 |
+
|
| 291 |
+
return demo
|
| 292 |
+
|
| 293 |
# ================================================================
|
| 294 |
# FOR HUGGINGFACE SPACES DEPLOYMENT
|
| 295 |
# ================================================================
|
|
|
|
| 312 |
show_error=True, # Show errors in interface
|
| 313 |
show_tips=True, # Show Gradio tips
|
| 314 |
enable_queue=True # Enable queueing for better performance
|
| 315 |
+
)
|