LucyintheSky commited on
Commit
6f62fb6
1 Parent(s): 1c0019e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -5,6 +5,7 @@ import io
5
  from PIL import Image
6
  import os
7
 
 
8
  API_URL = "https://api-inference.huggingface.co/models/tonyassi/tony-assi-lora-1"
9
  headers = {"Authorization": "Bearer " + os.environ.get('TOKEN')}
10
 
@@ -12,7 +13,10 @@ def query(payload):
12
  response = requests.post(API_URL, headers=headers, json=payload)
13
  return response.content
14
 
 
 
15
  def generate(prompt):
 
16
  image_bytes = query({
17
  "inputs": "Tony Assi style " + prompt,
18
  "parameters" : { "negative_prompt": "ugly, deformed, bad quality",
@@ -20,6 +24,8 @@ def generate(prompt):
20
  })
21
  image = Image.open(io.BytesIO(image_bytes))
22
  return image
 
 
23
 
24
  theme = gr.themes.Base(
25
  primary_hue="gray",
 
5
  from PIL import Image
6
  import os
7
 
8
+ """
9
  API_URL = "https://api-inference.huggingface.co/models/tonyassi/tony-assi-lora-1"
10
  headers = {"Authorization": "Bearer " + os.environ.get('TOKEN')}
11
 
 
13
  response = requests.post(API_URL, headers=headers, json=payload)
14
  return response.content
15
 
16
+ """
17
+
18
  def generate(prompt):
19
+ """
20
  image_bytes = query({
21
  "inputs": "Tony Assi style " + prompt,
22
  "parameters" : { "negative_prompt": "ugly, deformed, bad quality",
 
24
  })
25
  image = Image.open(io.BytesIO(image_bytes))
26
  return image
27
+ """
28
+ return None
29
 
30
  theme = gr.themes.Base(
31
  primary_hue="gray",