Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,8 @@
|
|
1 |
-
import
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
url = f"spaces/{username}/{repo}"
|
10 |
-
print(url)
|
11 |
-
|
12 |
-
# Dapatkan token akses Hugging Face dari variabel lingkungan
|
13 |
-
# token = os.environ.get("AI_Image")
|
14 |
-
|
15 |
-
# Buat antarmuka Gradio
|
16 |
-
iface = gr.Interface.load(url)
|
17 |
-
|
18 |
-
# Jalankan antarmuka di localhost atau sesuaikan dengan kebutuhan Anda
|
19 |
-
iface.launch()
|
|
|
1 |
+
from gradio_client import Client
|
2 |
+
|
3 |
+
client = Client("Adityadn/Test")
|
4 |
+
result = client.predict(
|
5 |
+
"Hello!!", # str in 'text' Textbox component
|
6 |
+
api_name="/predict"
|
7 |
+
)
|
8 |
+
print(result)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|