Gradio closed-sourced app?

Hello there! I was wondering if I can make a closed source app with gradio(only the ui is shown to the user and the source code is private only to me).

Is this possible?
Thanks in advance.

hi @nbaru , in regards of a private Gradio Space, here is another answer that might help you.
Please let me know if that helps

In my case I was trying to hide the model. I’ll add here because I didn’t find good solutions online.

This is a bit similar to your solutions anyway.

1 I have a private organization where I put private models.
2 I have another private organization where I show demos in Spaces.
3 In a Space , I use access tokens to get the private models from point 1. For example:

from transformers import pipeline
import gradio as gr
import os


access_token = os.environ['ACCESS_TOKEN']

pipe = pipeline("text-classification", model="private_organization/private_model", token=access_token)
demo = gr.Interface.from_pipeline(pipe)
demo.launch()

I can add new members to the organization at point 2 to see demos. Remember that new members should only have read permissions, otherwise they will be able to write something like print(os.environ['ACCESS_TOKEN'])