Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from ui.resonance_tab import create_gradio_interface
|
| 3 |
+
from core.logging_config import setup_secure_logging
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
def main():
|
| 7 |
+
# Initialize secure logging
|
| 8 |
+
setup_secure_logging()
|
| 9 |
+
|
| 10 |
+
# Create Gradio interface - Hugging Face compatible way
|
| 11 |
+
interface = create_gradio_interface(lang='ru')
|
| 12 |
+
|
| 13 |
+
# Hugging Face compatible launch
|
| 14 |
+
interface.launch(
|
| 15 |
+
server_name="0.0.0.0",
|
| 16 |
+
server_port=7860, # Fixed port for Hugging Face
|
| 17 |
+
pwa=True,
|
| 18 |
+
show_error=True
|
| 19 |
+
)
|
| 20 |
+
|
| 21 |
+
if __name__ == "__main__":
|
| 22 |
+
main()
|