Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import pandas as pd
|
2 |
import gradio as gr
|
3 |
|
4 |
-
df = pd.read_csv("
|
5 |
df['url'] = df['url'].apply(lambda x: '<a href= "' + str(x) + '" target="_blank"> <img src= "' + str(x) + '"/> </a>') #'<img src= "' + str(x) + '"/> </a>')
|
6 |
df['seed'] = df['seed'].apply(lambda x: str(x))
|
7 |
df['width'] = df['width'].apply(lambda x: str(x))
|
@@ -23,7 +23,6 @@ def display_next10(dataframe, end):
|
|
23 |
#Gradio Blocks
|
24 |
with gr.Blocks() as demo:
|
25 |
gr.Markdown("<h1><center>Utility Gradio Space for viewing PlaygroundAI Images</center></h1>")
|
26 |
-
gr.Markdown("""<img src='https://xxxxxxxx.jpg' class='center'> <br> """)
|
27 |
gr.Markdown(
|
28 |
"""<div align="center">This Tool helps you to analyze and inspect the images and corresponding prompts from <a href = "https://playgroundai.com/">Playground AI</a> Images.<br><a href="https://twitter.com/Suhail">Suhail</a> has recently shared an open dataset of all the liked images and their prompts from PlaygroundAI on <a href="https://github.com/playgroundai/liked_images">Github here</a>. This is an attempt to explore this dataset beautifully using the power and flexibility of Gradio!<br><b>To use the tool:</b>First, click on the 'Initial' button, and then iteratively on the 'Next 10' button.<br><b>Bonus:</b>Click on images to get the original PlaygroundAI image displayed on next tab</div>""")
|
29 |
|
|
|
1 |
import pandas as pd
|
2 |
import gradio as gr
|
3 |
|
4 |
+
df = pd.read_csv("images.csv")
|
5 |
df['url'] = df['url'].apply(lambda x: '<a href= "' + str(x) + '" target="_blank"> <img src= "' + str(x) + '"/> </a>') #'<img src= "' + str(x) + '"/> </a>')
|
6 |
df['seed'] = df['seed'].apply(lambda x: str(x))
|
7 |
df['width'] = df['width'].apply(lambda x: str(x))
|
|
|
23 |
#Gradio Blocks
|
24 |
with gr.Blocks() as demo:
|
25 |
gr.Markdown("<h1><center>Utility Gradio Space for viewing PlaygroundAI Images</center></h1>")
|
|
|
26 |
gr.Markdown(
|
27 |
"""<div align="center">This Tool helps you to analyze and inspect the images and corresponding prompts from <a href = "https://playgroundai.com/">Playground AI</a> Images.<br><a href="https://twitter.com/Suhail">Suhail</a> has recently shared an open dataset of all the liked images and their prompts from PlaygroundAI on <a href="https://github.com/playgroundai/liked_images">Github here</a>. This is an attempt to explore this dataset beautifully using the power and flexibility of Gradio!<br><b>To use the tool:</b>First, click on the 'Initial' button, and then iteratively on the 'Next 10' button.<br><b>Bonus:</b>Click on images to get the original PlaygroundAI image displayed on next tab</div>""")
|
28 |
|