VincentGOURBIN commited on
Commit
f68e708
Β·
verified Β·
1 Parent(s): 1d1fd1d

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +31 -0
app.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ PVB Flow - Hugging Face Spaces Version
4
+ Product Vision Board to Mermaid diagram generation with Mistral API.
5
+ """
6
+
7
+ import gradio as gr
8
+ import os
9
+ from pathlib import Path
10
+
11
+ # Import custom modules
12
+ from src.ui.spaces_interface import create_spaces_interface
13
+
14
+ def main():
15
+ """Main entry point for the Hugging Face Spaces app."""
16
+
17
+ # Create the Gradio interface
18
+ interface = create_spaces_interface()
19
+
20
+ # Launch with specific settings for HF Spaces
21
+ port = int(os.environ.get("GRADIO_SERVER_PORT", 7860))
22
+ interface.launch(
23
+ server_name="0.0.0.0",
24
+ server_port=port,
25
+ share=False,
26
+ show_error=True,
27
+ quiet=False
28
+ )
29
+
30
+ if __name__ == "__main__":
31
+ main()