|
|
|
|
|
import os |
|
import sys |
|
import cv2 |
|
import json |
|
import random |
|
import time |
|
import pickle |
|
import requests |
|
import func_timeout |
|
import numpy as np |
|
import gradio as gr |
|
from collections import OrderedDict |
|
|
|
|
|
taskType = "3" |
|
|
|
|
|
if taskType=="3": |
|
|
|
is_show_token = True |
|
|
|
title = r""" |
|
<h1 align="center">Selfit AI App: Product poster background generation</h1> |
|
""" |
|
|
|
description = r""" |
|
Go to <a href='https://heybeauty.ai/extension' target='_blank'><b>HeyBeauty</b></a> for Faster and Free AI App! 🤗 .<br> |
|
|
|
1. Please wait for a while after submitting the task, you will get the result within 30 seconds. |
|
2. After exhausted all trial attempts, you can <a href='https://heybeauty.ai/keys' target='_blank'><b>find your api key here</b></a> .<br> |
|
3. Share app with your friends and enjoy! 😊.<br> |
|
""" |
|
else: |
|
|
|
is_show_token = False |
|
|
|
title = r""" |
|
<h1 align="center">Selfit AI App: Product poster background generation</h1> |
|
""" |
|
|
|
description = r""" |
|
<a href='https://heybeauty.ai/extension' target='_blank'><b> Go to HeyBeauty for Faster and Free AI App! 🤗 </b></a>.<br> |
|
|
|
<b>Official 🤗 Gradio demo</b> for <a href='https://github.com/selfitcamera/Outfit-Anyone-in-the-Wild' target='_blank'><b>Product poster background generation</b></a>.<br> |
|
1. Please wait for a while after submitting the task, you will get the result within 30 seconds. |
|
2. <a href='https://heybeauty.ai/keys' target='_blank'><b>You can find your api key here</b></a> .<br> |
|
3. Share app with your friends and enjoy! 😊.<br> |
|
""" |
|
|
|
if is_show_token: |
|
|
|
no_more_attempts = "You've exhausted all trial attempts. [Enter Your API Key](https://heybeauty.ai/keys) to continue..." |
|
else: |
|
|
|
no_more_attempts = "You've exhausted all trial attempts." |
|
|
|
|
|
|