JV A commited on
Commit
d35c749
·
1 Parent(s): da1b766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -3,15 +3,15 @@ import requests
3
  import json
4
  import PIL.Image
5
  from io import BytesIO
6
-
7
  def generate_image(prompt):
8
  # Define the API endpoint
9
- apiUrl = "https://apiv2.makeai.run/v2/txt2img"
10
-
11
  # Define the request headers
12
  headers = {
13
  "Content-Type": "application/json",
14
- "token": "514f7ecde6a5434dbab5c6579311ad82"
15
  }
16
 
17
  # Define the request body
 
3
  import json
4
  import PIL.Image
5
  from io import BytesIO
6
+ import os
7
  def generate_image(prompt):
8
  # Define the API endpoint
9
+ apiUrl = os.getenv("API_URL")
10
+ token = os.getenv("API_TOKEN")
11
  # Define the request headers
12
  headers = {
13
  "Content-Type": "application/json",
14
+ "token": "token"
15
  }
16
 
17
  # Define the request body