Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -64,9 +64,8 @@ Prompt: [Anything you want] pixel art style, pixels, pixel art 
     | 
|
| 64 | 
         
             
            **Your Output**: A futuristic cityscape at night, in a cyberpunk style, with neon lights reflecting off wet streets, towering skyscrapers, and a glowing, high-tech atmosphere. Dark shadows contrast with vibrant neon signs, creating a dramatic, dystopian mood`
         
     | 
| 65 | 
         
             
            """
         
     | 
| 66 | 
         | 
| 67 | 
         
            -
            client = Cloudflare(api_token=API_TOKEN)
         
     | 
| 68 | 
         
            -
             
     | 
| 69 | 
         
             
            def generate_image(prompt):
         
     | 
| 
         | 
|
| 70 | 
         
             
                try:
         
     | 
| 71 | 
         
             
                    data = client.workers.ai.with_raw_response.run(
         
     | 
| 72 | 
         
             
                        model_name=IMAGE_MODEL,
         
     | 
| 
         @@ -82,6 +81,7 @@ def generate_image(prompt): 
     | 
|
| 82 | 
         
             
                    raise gr.Error(str(e))
         
     | 
| 83 | 
         | 
| 84 | 
         
             
            def generate_text(prompt, system_prompt):
         
     | 
| 
         | 
|
| 85 | 
         
             
                messages = [
         
     | 
| 86 | 
         
             
                    {"role": "system", "content": system_prompt},
         
     | 
| 87 | 
         
             
                    {"role": "user", "content": prompt}
         
     | 
| 
         | 
|
| 64 | 
         
             
            **Your Output**: A futuristic cityscape at night, in a cyberpunk style, with neon lights reflecting off wet streets, towering skyscrapers, and a glowing, high-tech atmosphere. Dark shadows contrast with vibrant neon signs, creating a dramatic, dystopian mood`
         
     | 
| 65 | 
         
             
            """
         
     | 
| 66 | 
         | 
| 
         | 
|
| 
         | 
|
| 67 | 
         
             
            def generate_image(prompt):
         
     | 
| 68 | 
         
            +
                client = Cloudflare(api_token=API_TOKEN)
         
     | 
| 69 | 
         
             
                try:
         
     | 
| 70 | 
         
             
                    data = client.workers.ai.with_raw_response.run(
         
     | 
| 71 | 
         
             
                        model_name=IMAGE_MODEL,
         
     | 
| 
         | 
|
| 81 | 
         
             
                    raise gr.Error(str(e))
         
     | 
| 82 | 
         | 
| 83 | 
         
             
            def generate_text(prompt, system_prompt):
         
     | 
| 84 | 
         
            +
                client = Cloudflare(api_token=API_TOKEN)
         
     | 
| 85 | 
         
             
                messages = [
         
     | 
| 86 | 
         
             
                    {"role": "system", "content": system_prompt},
         
     | 
| 87 | 
         
             
                    {"role": "user", "content": prompt}
         
     |