dev2bbus commited on
Commit
013d4e1
·
verified ·
1 Parent(s): 797a1d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -1,20 +1,14 @@
1
  import os
2
  import gradio as gr
3
 
 
 
 
4
  # Load the components from the private Space
5
  loaded_components = gr.load(
6
  "spaces/OptiPose/JavePose_private",
7
  hf_token=os.environ["HUGGINGFACE_TOKEN"]
8
  )
9
 
10
- # Recreate the interface using the loaded components
11
- interface = gr.Interface(
12
- fn=loaded_components.predict,
13
- inputs=loaded_components.input_components,
14
- outputs=loaded_components.output_components,
15
- title=loaded_components.title,
16
- description=loaded_components.description,
17
- )
18
-
19
- # Launch the interface
20
- interface.launch()
 
1
  import os
2
  import gradio as gr
3
 
4
+ # Set your Hugging Face API token
5
+ os.environ["HUGGINGFACE_TOKEN"] = "your_huggingface_token_here"
6
+
7
  # Load the components from the private Space
8
  loaded_components = gr.load(
9
  "spaces/OptiPose/JavePose_private",
10
  hf_token=os.environ["HUGGINGFACE_TOKEN"]
11
  )
12
 
13
+ # Launch the loaded components directly
14
+ loaded_components.launch()