Spaces:
Running
Running
FoodDesert
commited on
Commit
•
8aafa85
1
Parent(s):
e0e3e94
Upload 2 files
Browse files- app.py +4 -4
- mascotimages/transparentsquirrel.png +0 -0
app.py
CHANGED
@@ -204,7 +204,6 @@ with open("word_rating_probabilities.csv", 'r', newline='', encoding='utf-8') as
|
|
204 |
nsfw_tags.add(word)
|
205 |
|
206 |
|
207 |
-
|
208 |
sample_images_directory_path = 'sampleimages'
|
209 |
def generate_artist_image_tuples(top_artists, image_directory):
|
210 |
json_files = glob.glob(f'{image_directory}/*.json')
|
@@ -655,11 +654,12 @@ with gr.Blocks(css=css) as app:
|
|
655 |
image_tags = gr.Textbox(label="Enter Prompt", placeholder="e.g. fox, outside, detailed background, ...")
|
656 |
bad_tags_illustrated_string = gr.HighlightedText(show_legend=True, color_map={"Unknown Tag":"red","Duplicate":"yellow","Remove Final Comma":"purple","Move Comma Inside Parentheses":"green"}, label="Annotated Prompt")
|
657 |
with gr.Column(scale=1):
|
658 |
-
#gr.Image(label=" ", value="transparentsquirrel.png", height=155, width=140)
|
659 |
#image_path = os.path.join("https://huggingface.co/spaces/FoodDesert/Prompt_Squirrel/resolve/main", "transparentsquirrel.png")
|
660 |
-
#gr.
|
|
|
|
|
661 |
#gr.HTML("<br>" * 2) # Adjust the number of line breaks ("<br>") as needed to push the button down
|
662 |
-
gr.Image(value=
|
663 |
submit_button = gr.Button(variant="primary")
|
664 |
with gr.Row():
|
665 |
with gr.Column(scale=3):
|
|
|
204 |
nsfw_tags.add(word)
|
205 |
|
206 |
|
|
|
207 |
sample_images_directory_path = 'sampleimages'
|
208 |
def generate_artist_image_tuples(top_artists, image_directory):
|
209 |
json_files = glob.glob(f'{image_directory}/*.json')
|
|
|
654 |
image_tags = gr.Textbox(label="Enter Prompt", placeholder="e.g. fox, outside, detailed background, ...")
|
655 |
bad_tags_illustrated_string = gr.HighlightedText(show_legend=True, color_map={"Unknown Tag":"red","Duplicate":"yellow","Remove Final Comma":"purple","Move Comma Inside Parentheses":"green"}, label="Annotated Prompt")
|
656 |
with gr.Column(scale=1):
|
|
|
657 |
#image_path = os.path.join("https://huggingface.co/spaces/FoodDesert/Prompt_Squirrel/resolve/main", "transparentsquirrel.png")
|
658 |
+
#gr.Image(label=" ", value=image_path, height=155, width=140)
|
659 |
+
image_path = os.path.join('mascotimages', "transparentsquirrel.png")
|
660 |
+
#gr.HTML('<div style="text-align: center;"><img src={image_path} alt="Cute Mascot" style="max-height: 100px; background: transparent;"></div><br>')
|
661 |
#gr.HTML("<br>" * 2) # Adjust the number of line breaks ("<br>") as needed to push the button down
|
662 |
+
gr.Image(value=image_path,show_label=False, show_download_button=False, show_share_button=False, height=200)
|
663 |
submit_button = gr.Button(variant="primary")
|
664 |
with gr.Row():
|
665 |
with gr.Column(scale=3):
|
mascotimages/transparentsquirrel.png
ADDED