AbstractPhil commited on
Commit
3b9b8cb
·
verified ·
1 Parent(s): 16921b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -32,8 +32,18 @@ from transformers import (
32
  )
33
  from huggingface_hub import hf_hub_download
34
 
35
- from geofractal.model.vae.vae_lyra_v2 import MultiModalVAE, MultiModalVAEConfig
36
- LYRA_AVAILABLE = True
 
 
 
 
 
 
 
 
 
 
37
 
38
  # ============================================================================
39
  # CONSTANTS
@@ -1274,7 +1284,7 @@ def generate_image(
1274
  def create_demo():
1275
  """Create Gradio interface."""
1276
 
1277
- with gr.Blocks() as demo:
1278
  gr.Markdown("""
1279
  # 🌙 Lyra/Lune Flow-Matching Image Generation
1280
 
@@ -1540,4 +1550,4 @@ def create_demo():
1540
  if __name__ == "__main__":
1541
  demo = create_demo()
1542
  demo.queue(max_size=20)
1543
- demo.launch(show_api=False)
 
32
  )
33
  from huggingface_hub import hf_hub_download
34
 
35
+ # Import Lyra VAE from geofractal
36
+ try:
37
+ from geofractal.models.vae.vae_lyra import MultiModalVAE, MultiModalVAEConfig
38
+ LYRA_AVAILABLE = True
39
+ except ImportError:
40
+ try:
41
+ from geofractal.train.model.vae.vae_lyra import MultiModalVAE, MultiModalVAEConfig
42
+ LYRA_AVAILABLE = True
43
+ except ImportError:
44
+ print("⚠️ Lyra VAE not available - install geofractal")
45
+ LYRA_AVAILABLE = False
46
+
47
 
48
  # ============================================================================
49
  # CONSTANTS
 
1284
  def create_demo():
1285
  """Create Gradio interface."""
1286
 
1287
+ with gr.Blocks(theme="soft") as demo:
1288
  gr.Markdown("""
1289
  # 🌙 Lyra/Lune Flow-Matching Image Generation
1290
 
 
1550
  if __name__ == "__main__":
1551
  demo = create_demo()
1552
  demo.queue(max_size=20)
1553
+ demo.launch()