Spaces:
Sleeping
Sleeping
import cv2 | |
import torch | |
import clip | |
import gradio as gr | |
import numpy as np | |
# Use GPU if available | |
if torch.cuda.is_available(): | |
device = torch.device("cuda") | |
else: | |
device = torch.device("cpu") | |
def manipulate_image(img, text_queries, score_threshold): | |
return img | |
description = """ | |
""" | |
demo = gr.Interface( | |
manipulate_image, | |
inputs=[gr.Image(), "text", gr.Slider(0, 1, value=0.1)], | |
outputs="image", | |
title="Text-guided image manipulation with StyleMC", | |
description=description, | |
) | |
demo.launch() |