Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,20 @@ florence_processor = AutoProcessor.from_pretrained('microsoft/Florence-2-base',
|
|
18 |
|
19 |
# api_key = os.getenv("HF_READ_TOKEN")
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
def generate_caption(image):
|
22 |
if not isinstance(image, Image.Image):
|
23 |
image = Image.fromarray(image)
|
@@ -63,6 +77,7 @@ io = gr.Interface(generate_caption,
|
|
63 |
inputs=[gr.Image(label="Input Image")],
|
64 |
outputs = [gr.Textbox(label="Output Prompt", lines=2, show_copy_button = True),
|
65 |
# gr.Image(label="Output Image")
|
|
|
66 |
]
|
67 |
)
|
68 |
io.launch(debug=True)
|
|
|
18 |
|
19 |
# api_key = os.getenv("HF_READ_TOKEN")
|
20 |
|
21 |
+
article_text = """
|
22 |
+
<div style="text-align: center;">
|
23 |
+
<p>Enjoying the tool? Buy me a coffee and get exclusive prompt guides!</p>
|
24 |
+
<p><i>Instantly unlock helpful tips for creating better prompts!</i></p>
|
25 |
+
<div style="display: flex; justify-content: center;">
|
26 |
+
<a href="https://piczify.lemonsqueezy.com/buy/0f5206fa-68e8-42f6-9ca8-4f80c587c83e">
|
27 |
+
<img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png"
|
28 |
+
alt="Buy Me a Coffee"
|
29 |
+
style="height: 40px; width: auto; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); border-radius: 10px;">
|
30 |
+
</a>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
"""
|
34 |
+
|
35 |
def generate_caption(image):
|
36 |
if not isinstance(image, Image.Image):
|
37 |
image = Image.fromarray(image)
|
|
|
77 |
inputs=[gr.Image(label="Input Image")],
|
78 |
outputs = [gr.Textbox(label="Output Prompt", lines=2, show_copy_button = True),
|
79 |
# gr.Image(label="Output Image")
|
80 |
+
article = article_text
|
81 |
]
|
82 |
)
|
83 |
io.launch(debug=True)
|