Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,3 @@
|
|
1 |
-
# App code based on: https://github.com/petergro-hub/ComicInpainting
|
2 |
-
# Model based on: https://github.com/saic-mdal/lama
|
3 |
-
|
4 |
import numpy as np
|
5 |
import pandas as pd
|
6 |
import streamlit as st
|
@@ -33,7 +30,6 @@ def image_download_button(pil_image, filename: str, fmt: str, label="Download"):
|
|
33 |
)
|
34 |
|
35 |
|
36 |
-
|
37 |
if "button_id" not in st.session_state:
|
38 |
st.session_state["button_id"] = ""
|
39 |
if "color_to_label" not in st.session_state:
|
@@ -119,12 +115,11 @@ if uploaded_file is not None:
|
|
119 |
if st.button('Submit'):
|
120 |
|
121 |
with st.spinner("AI is doing the magic!"):
|
122 |
-
output = process_inpaint(np.array(img_input), np.array(im))
|
123 |
img_output = Image.fromarray(output).convert("RGB")
|
124 |
|
125 |
st.write("AI has finished the job!")
|
126 |
st.image(img_output)
|
127 |
-
# reuse = st.button('Edit again (Re-use this image)', on_click=set_image, args=(inpainted_img, ))
|
128 |
|
129 |
uploaded_name = os.path.splitext(uploaded_file.name)[0]
|
130 |
image_download_button(
|
@@ -137,10 +132,11 @@ if uploaded_file is not None:
|
|
137 |
st.info("**TIP**: If the result is not perfect, you can download it then "
|
138 |
"upload then remove the artifacts.")
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
import pandas as pd
|
3 |
import streamlit as st
|
|
|
30 |
)
|
31 |
|
32 |
|
|
|
33 |
if "button_id" not in st.session_state:
|
34 |
st.session_state["button_id"] = ""
|
35 |
if "color_to_label" not in st.session_state:
|
|
|
115 |
if st.button('Submit'):
|
116 |
|
117 |
with st.spinner("AI is doing the magic!"):
|
118 |
+
output = process_inpaint(np.array(img_input), np.array(im))
|
119 |
img_output = Image.fromarray(output).convert("RGB")
|
120 |
|
121 |
st.write("AI has finished the job!")
|
122 |
st.image(img_output)
|
|
|
123 |
|
124 |
uploaded_name = os.path.splitext(uploaded_file.name)[0]
|
125 |
image_download_button(
|
|
|
132 |
st.info("**TIP**: If the result is not perfect, you can download it then "
|
133 |
"upload then remove the artifacts.")
|
134 |
|
135 |
+
# Markdown
|
136 |
+
st.markdown("""
|
137 |
+
**Best AI Tools**
|
138 |
+
[Nude AI](https://nudeai.beauty) • [Uncensored AI](https://uncensoredai.cc) • [AI Hentai Generator](https://aihentaigenerator.fun) • [Stable Diffusion Hentai](https://stable-diffusion-hentai.aihentaigenerator.fun) • [Bing Image Creator](https://bingimagecreator.online) • [NSFW AI Art](https://nsfwaiart.art) • [NSFW AI Chatbot](https://nsfw-ai-chatbot.online) • [NSFW AI World](https://nsfwai.world) • [AI Tools Directory](https://aitoolsdirectory.online) • [Viggle AI](https://viggleai.live) • [TDEE Calculator](https://tdeecalculator.online) • [Calculator App](https://calculatorapp.online) • [Compound Interest Calculator](https://compoundinterestcalculator.site) • [AI Story Generator](https://aistorygenerator.fun) • [Llama AI](https://llamaai.online) • [AI Art Free](https://aiartfree.online) • [Cek Khodam](https://cekkhodam.co) • [AI Detector](https://ai-detector.online) • [AI Cover](https://aicover.fun) • [Flux AI](https://flux-ai.online) • [Brat Generator](https://bratgenerator.org) • [AI Text Generator](https://aitextgenerator.live) • [Black Myth Wukong](https://blackmythwukong.buzz) • [Book Summary](https://booksummary.wiki) • [ChatGPT Gratuit](https://chatgptgratuit.chat) • [ChatGPT Online](https://chatgtponline.com) • [Gau Thai](https://gauthai.pro) • [Best Recipe](https://bestrecipe.pro)
|
139 |
+
|
140 |
+
**Games**
|
141 |
+
[Cookie Clicker Unblocked](https://cookie-clicker-unblocked.pro) • [Freaky Font](https://freakyfont.org) • [Chat Gratuito](https://chatgratuito.online) • [Incredibox Sprunki](https://incrediboxsprunki.pro) • [Moto X3M Unblocked](https://motox3munblocked.pro) • [Parkour Civilization](https://parkourcivilization.pro) • [Sled Rider 3D](https://sledrider3d.com) • [Snow Rider 3D](https://snow-rider-3d.pro) • [Sprunki Game](https://sprunkigame.pro) • [Stickman Hook Unblocked](https://stickmanhookunblocked.pro) • [Escape Road](https://escaperoad.fun) • [Sprunked](https://sprunked.pro) • [Abgerny](https://abgerny.buzz) • [Sprunki Phase](https://sprunki-phase.online) • [Block Blast](https://block-blast.pro) • [Traffic Racer](https://trafficracer.online) • [Football Bros](https://footballbros.online) • [Sprunki Parasite](https://sprunkiparasite.com) • [Sprunki Retake](https://sprunkiretake.online) • [Sprunki Mustard](https://sprunki-mustard.online) • [PVZ Fusion Download](https://pvz-fusion.online) • [My Femboy Roommate](https://myfemboy-roommate.com) • [Homicipher](https://homicipher.fun) • [Anime Reborn Codes](https://animereborncodes.com) • [The Rise of the Golden Idol](https://theriseofthegoldenidol.com/) • [Five Hearts Under One Roof](https://fiveheartsunderoneroof.com) • [Googlies](https://googlies.pro/) • [Discordservers Wiki](https://discordservers.wiki) • [Laundry Store Simulator](https://laundrystoresimulator.com) • [Chill Guy Clicker](https://chillguyclicker.fun) • [Aurelia Game](https://aureliagame.com) • [Kiwi Mod](https://kiwimod.com) • [Doodle Empires](https://doodleempires.org) • [Codes Rob](https://codesrob.com) • [Em Manga](https://emmanga.com) • [Chocolate Factory Sim](https://chocolatefactorysim.com) • [Desktop Mate](https://desktop-mate.com) • [Yellow Mod](https://yellowmod.com) • [PP Novel](https://ppnovel.org) • [Phi4 Chat](https://phi4.chat) • [Streamer Life Simulator 2](https://streamerlifesimulator2.org) • [Ninja Gaiden 2 Black](https://ninjagaiden2black.xyz) • [Dynasty Warriors Origins](https://dynastywarriorsorigins.org) • [Block Breaker](https://block-breaker.online) • [Game Repacks](https://gamerepacks.com) • [Em Manga](https://emmanga.com) • [Amenti Game](https://amentigame.com)
|
142 |
+
""")
|