File size: 1,298 Bytes
a305889
 
 
 
 
 
b91d31b
a305889
 
b91d31b
 
 
 
 
 
a305889
 
 
 
 
 
 
 
 
 
b91d31b
a305889
 
 
 
f10a9f5
 
 
 
 
 
a305889
 
b91d31b
a305889
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""
Launch Chat Interface
Quick launcher for the new chat-based interface
"""

from chat_interface import create_chat_interface
from datetime import datetime

if __name__ == "__main__":
    # Write directly to log file
    with open('/tmp/chat_output.log', 'a') as f:
        f.write(f"\n{'='*70}\n")
        f.write(f"TSDB APP START: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
        f.write(f"{'='*70}\n\n")
    
    print("πŸš€ Starting Chat-Based Demo Builder...")
    print("=" * 60)
    print()
    print("πŸ’¬ New Chat Interface Features:")
    print("  β€’ Natural language conversation")
    print("  β€’ /over command to change company/use case")
    print("  β€’ Visible stage indicator (read-only)")
    print("  β€’ Editable AI model selector")
    print("  β€’ Quick action buttons")
    print()
    print("🌐 Opening in browser at http://localhost:7863")
    print("=" * 60)
    
    app = create_chat_interface()
    
    # Enable concurrent request handling
    # Each session gets its own ChatDemoInterface via gr.State()
    app.queue(
        default_concurrency_limit=6,  # Allow up to 6 concurrent demo builds
    )
    
    app.launch(
        server_name="0.0.0.0",
        server_port=7863,
        share=False,
        inbrowser=True,
        debug=True
    )