dev2bbus commited on
Commit
6ef1cfd
·
verified ·
1 Parent(s): 854b0f3

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Load the private Space using its URL or ID
4
+ def load_private_space():
5
+ private_space_url = "https://huggingface.co/spaces/OptiPose/JavePose_private"
6
+ # Use `gr.Interface.load` to load the private Space
7
+ interface = gr.Interface.load(private_space_url)
8
+ return interface
9
+
10
+ # Create a Gradio interface for the public Space
11
+ def public_interface(input):
12
+ # Get the interface from the private Space
13
+ private_interface = load_private_space()
14
+
15
+ # Use the private interface to handle the input
16
+ output = private_interface(input)
17
+ return output
18
+
19
+ # Define your public interface
20
+ iface = gr.Interface(fn=public_interface, inputs="text", outputs="text")
21
+ iface.launch()