Ashrafb commited on
Commit
3db422f
·
verified ·
1 Parent(s): 97f13b8

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -21,7 +21,7 @@ API_TOKEN = os.getenv("HF_READ_TOKEN") # it is free
21
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
22
  def generate_image(prompt):
23
  try:
24
- payload = {"inputs": prompt}
25
  response = requests.post(API_URL, headers=headers, json=payload)
26
  response.raise_for_status() # Raise an exception for HTTP errors
27
  image_bytes = response.content
 
21
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
22
  def generate_image(prompt):
23
  try:
24
+ payload = {"inputs": prompt,noise_level}
25
  response = requests.post(API_URL, headers=headers, json=payload)
26
  response.raise_for_status() # Raise an exception for HTTP errors
27
  image_bytes = response.content