Spaces:
Runtime error
Runtime error
import gradio as gr | |
from spaces_utils import authenticate | |
# Load tokens | |
GRADIO_TOKEN = os.environ.get("GRADIO_ORG") # read | |
# Logs repo path | |
dataset_url = "https://huggingface.co/datasets/sandl/upload_bond_coat_segmentation" | |
dataset_path = "logs_bond_coat_segmentation.csv" | |
def authenticate_from_public(username, password): | |
return authenticate(username, password, dataset_url, dataset_path) | |
css_styling = """#submit {background: #FF8C00} | |
#submit {color: white} | |
.output-image, .input-image, .image-preview {height: 250px !important}""" | |
with gr.Blocks(css=css_styling) as demo_from_private: | |
gr.Interface.load("spaces/sandl/private_particles_segmentation", api_key=GRADIO_TOKEN, enable_queue=True) | |
if __name__ == "__main__": | |
demo_from_private.queue(concurrency_count=2) | |
demo_from_private.launch(auth=authenticate_from_public, debug=True, enable_queue=True) |