Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	Update main.py
Browse files
    	
        main.py
    CHANGED
    
    | 
         @@ -39,17 +39,6 @@ async def favicon(): 
     | 
|
| 39 | 
         
             
                favicon_path = Path(__file__).parent / "favicon.ico"
         
     | 
| 40 | 
         
             
                return FileResponse(favicon_path, media_type="image/x-icon")
         
     | 
| 41 | 
         | 
| 42 | 
         
            -
             
     | 
| 43 | 
         
            -
            import json
         
     | 
| 44 | 
         
            -
            import requests
         
     | 
| 45 | 
         
            -
            from fastapi import FastAPI, HTTPException
         
     | 
| 46 | 
         
            -
            from fastapi.responses import StreamingResponse, JSONResponse
         
     | 
| 47 | 
         
            -
            from typing import Optional
         
     | 
| 48 | 
         
            -
             
     | 
| 49 | 
         
            -
            app = FastAPI()
         
     | 
| 50 | 
         
            -
             
     | 
| 51 | 
         
            -
            secret_api_endpoint_3 = "your_secret_endpoint_here"  # Replace with your actual endpoint
         
     | 
| 52 | 
         
            -
             
     | 
| 53 | 
         
             
            def generate_search(query: str, stream: bool = True) -> str:
         
     | 
| 54 | 
         
             
                headers = {"User-Agent": ""}
         
     | 
| 55 | 
         
             
                prompt = [
         
     | 
| 
         | 
|
| 39 | 
         
             
                favicon_path = Path(__file__).parent / "favicon.ico"
         
     | 
| 40 | 
         
             
                return FileResponse(favicon_path, media_type="image/x-icon")
         
     | 
| 41 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 42 | 
         
             
            def generate_search(query: str, stream: bool = True) -> str:
         
     | 
| 43 | 
         
             
                headers = {"User-Agent": ""}
         
     | 
| 44 | 
         
             
                prompt = [
         
     |