File size: 915 Bytes
c4bca75
d7024bf
 
 
 
 
 
 
 
 
 
 
 
c4bca75
36771cf
c4bca75
 
de1a3cf
0aecf3d
 
 
de1a3cf
 
21da889
3280e63
8ebf241
de1a3cf
 
 
d7024bf
235323f
a899bea
de1a3cf
c4bca75
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import gradio as gr
import random
import requests
import io
from PIL import Image

API_URL = "https://api-inference.huggingface.co/models/tonyassi/tony-assi-lora-1"
headers = {"Authorization": "Bearer " + os.environ.get('TOKEN')}

def query(payload):
	response = requests.post(API_URL, headers=headers, json=payload)
	return response.content


def generate(prompt):
    return None

theme = gr.themes.Base(
    primary_hue="gray",
    secondary_hue="gray",
    neutral_hue="gray",
    font=['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'],
).set(
    button_large_text_weight='400',
    input_background_fill='#ffffff',
    input_border_width='*block_border_width',
)

with gr.Blocks(theme=theme) as demo:
    img = gr.Image(show_label=False, type='pil')
    textbox = gr.Textbox(show_label=False)
    button = gr.Button("generate")
    button.click(fn=generate, inputs=textbox, outputs=img)

demo.launch()