File size: 441 Bytes
e010a87
 
bd0ea97
 
 
533c085
 
 
 
 
1c0dacb
bd0ea97
e010a87
 
 
bd0ea97
e010a87
bd0ea97
 
2f847d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import subprocess
import os
import gradio as gr

# Ganti URL model dengan URL model Anda di Hugging Face Spaces

username = "Adityadn"
repo = "test"

url = f"spaces/{username}/{repo}"
print(url)

# Dapatkan token akses Hugging Face dari variabel lingkungan
token = os.environ.get("AI_Image")

# Buat antarmuka Gradio
iface = gr.load(url, hf_token=token)

# Jalankan antarmuka di localhost atau sesuaikan dengan kebutuhan Anda
iface.launch()