|
|
""" |
|
|
DungeonMaster AI - HuggingFace Spaces Entry Point |
|
|
|
|
|
This is the main entry point for the HuggingFace Spaces deployment. |
|
|
It imports and launches the Gradio application from ui/app.py. |
|
|
""" |
|
|
|
|
|
import os |
|
|
import sys |
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
|
|
|
|
|
|
|
|
from ui.app import create_app, main, load_custom_css, CRITICAL_HEAD_CSS |
|
|
from ui.themes.fantasy_theme import fantasy_theme |
|
|
|
|
|
if __name__ == "__main__": |
|
|
main() |
|
|
else: |
|
|
|
|
|
demo = create_app() |
|
|
|
|
|
|
|
|
custom_css = load_custom_css() |
|
|
|
|
|
|
|
|
if custom_css: |
|
|
demo.css = custom_css |
|
|
demo.theme = fantasy_theme |
|
|
demo.head = CRITICAL_HEAD_CSS |
|
|
|