Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| Simple launcher for PerplexityViewer that handles common issues | |
| """ | |
| import sys | |
| import os | |
| def main(): | |
| """Simple launcher with fallback options""" | |
| print("π Starting PerplexityViewer...") | |
| try: | |
| # Try importing required modules | |
| import gradio as gr | |
| print(f"β Gradio version: {gr.__version__}") | |
| # Import the app | |
| from app import demo | |
| # Launch with minimal configuration | |
| print("π Launching app at http://localhost:7860") | |
| demo.launch() | |
| except ImportError as e: | |
| print(f"β Missing dependency: {e}") | |
| print("π‘ Install requirements with: pip install -r requirements.txt") | |
| sys.exit(1) | |
| except Exception as e: | |
| print(f"β Launch failed: {e}") | |
| print("π‘ Trying alternative methods...") | |
| # Try different launch approaches | |
| try: | |
| from app import demo | |
| demo.launch(server_name="127.0.0.1", server_port=7860) | |
| except: | |
| try: | |
| from app import demo | |
| demo.launch(share=False, debug=True) | |
| except: | |
| print("β All launch methods failed") | |
| print("π‘ Try running: python app.py directly") | |
| sys.exit(1) | |
| if __name__ == "__main__": | |
| main() | |