Spaces:
Sleeping
Sleeping
import gradio as gr | |
import os | |
import requests | |
import json | |
from huggingface_hub import login | |
from css_html_js import custom_css | |
from about import ( | |
CITATION_BUTTON_LABEL, | |
CITATION_BUTTON_TEXT, | |
EVALUATION_QUEUE_TEXT, | |
INTRODUCTION_TEXT, | |
LLM_BENCHMARKS_TEXT, | |
TITLE, | |
) | |
with gr.Blocks() as demo: | |
gr.HTML(TITLE) | |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text") | |
with gr.Row(): | |
drop1 = gr.Dropdown(["Church", "Parachute", "Garbage"], label="Objects") | |
drop2 = gr.Dropdown(["Van Gogh"], label="Styles") | |
drop3 = gr.Dropdown(["Nudity", "Violence", "Illegal Activity"], label="Concepts") | |
with gr.Row(): | |
with gr.Column(scale=1, min_width=600): | |
text1 = gr.Textbox(label="Attacking Prompt") | |
inbtw = gr.Button("Add") | |
text4 = gr.Textbox(label="Embedding") | |
with gr.Row(): | |
with gr.Column(scale=1, min_width=300): | |
img1 = gr.Image("images/cheetah.jpg",label="Image") | |
with gr.Column(scale=1, min_width=300): | |
img2 = gr.Image("images/cheetah.jpg",label="After Defense") | |
demo.launch() |