Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from transformers import StoppingCriteria, TextIteratorStreamer, StoppingCriteri
|
|
8 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
9 |
|
10 |
|
11 |
-
title = """<h1 style="text-align: center;">Product description generator</h1
|
12 |
css = """
|
13 |
div#col-container {
|
14 |
margin: 0 auto;
|
@@ -83,7 +83,7 @@ def response(message, history, image):
|
|
83 |
history[-1][1] = partial_response
|
84 |
yield history
|
85 |
|
86 |
-
with gr.Blocks(css=css) as demo:
|
87 |
with gr.Column(elem_id="col-container"):
|
88 |
gr.HTML(title)
|
89 |
image = gr.Image(type="pil", elem_id="upload")
|
|
|
8 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
9 |
|
10 |
|
11 |
+
title = """<h1 style="text-align: center;">Product description generator</h1>"""
|
12 |
css = """
|
13 |
div#col-container {
|
14 |
margin: 0 auto;
|
|
|
83 |
history[-1][1] = partial_response
|
84 |
yield history
|
85 |
|
86 |
+
with gr.Blocks(css=css, js="/assets/bg-remove.js") as demo:
|
87 |
with gr.Column(elem_id="col-container"):
|
88 |
gr.HTML(title)
|
89 |
image = gr.Image(type="pil", elem_id="upload")
|