ilhamdev commited on
Commit
24c6880
·
1 Parent(s): 1ff92db

feat: add ZeroGPU support with environment template and import ignore comment

Browse files
Files changed (3) hide show
  1. .env.example +2 -0
  2. README.md +1 -1
  3. app.py +1 -0
.env.example CHANGED
@@ -0,0 +1,2 @@
 
 
 
1
+ PAIRING_NUMBER="628xxxxxxxx"
2
+ PFP_PATH="pfp.jpg"
README.md CHANGED
@@ -32,7 +32,7 @@ Aplikasi ini dirancang untuk dapat dijalankan secara terpisah:
32
  1. Buka [Hugging Face](https://huggingface.co/) & buat Space baru ([huggingface.co/new-space](https://huggingface.co/new-space)):
33
  - **Space name**: misalnya `wa-pfp-server`
34
  - **Select the Space SDK**: Pilih **Gradio** (Template: **Blank**) *(100% Gratis!)*
35
- - **Space hardware**: Pilih **CPU basic (Free)**
36
  2. Push repository ini ke Hugging Face Space Anda (via Git).
37
  3. Hugging Face akan menjalankan launcher [`app.py`](app.py) yang otomatis mengompilasi dan menjalankan server Go pada port 7860.
38
  4. Setelah statusnya **Running**, backend Anda aktif di:
 
32
  1. Buka [Hugging Face](https://huggingface.co/) & buat Space baru ([huggingface.co/new-space](https://huggingface.co/new-space)):
33
  - **Space name**: misalnya `wa-pfp-server`
34
  - **Select the Space SDK**: Pilih **Gradio** (Template: **Blank**) *(100% Gratis!)*
35
+ - **Space hardware**: Pilih **ZeroGPU (Free)**
36
  2. Push repository ini ke Hugging Face Space Anda (via Git).
37
  3. Hugging Face akan menjalankan launcher [`app.py`](app.py) yang otomatis mengompilasi dan menjalankan server Go pada port 7860.
38
  4. Setelah statusnya **Running**, backend Anda aktif di:
app.py CHANGED
@@ -7,6 +7,7 @@ import tarfile
7
 
8
  # Mock @spaces.GPU untuk mencegah error jika Space tidak sengaja di-set ke ZeroGPU
9
  try:
 
10
  import spaces
11
  @spaces.GPU
12
  def dummy_zero_gpu():
 
7
 
8
  # Mock @spaces.GPU untuk mencegah error jika Space tidak sengaja di-set ke ZeroGPU
9
  try:
10
+ # pyrefly: ignore [missing-import]
11
  import spaces
12
  @spaces.GPU
13
  def dummy_zero_gpu():