Adityadn commited on
Commit
2f1b79c
·
verified ·
1 Parent(s): 721f06e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -19
app.py CHANGED
@@ -1,19 +1,8 @@
1
- import os
2
- import gradio as gr
3
-
4
- # Ganti URL model dengan URL model Anda di Hugging Face Spaces
5
-
6
- username = "Adityadn"
7
- repo = "test"
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)