Spaces:
Sleeping
Sleeping
add gpu dec
Browse files- app.py +6 -1
- requirements.txt +2 -0
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
-
|
| 4 |
|
| 5 |
def respond(
|
| 6 |
message,
|
|
@@ -68,3 +68,8 @@ with gr.Blocks() as demo:
|
|
| 68 |
|
| 69 |
if __name__ == "__main__":
|
| 70 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
+
import spaces
|
| 4 |
|
| 5 |
def respond(
|
| 6 |
message,
|
|
|
|
| 68 |
|
| 69 |
if __name__ == "__main__":
|
| 70 |
demo.launch()
|
| 71 |
+
|
| 72 |
+
# 在这里写个 @spaces.GPU 函数,蒙混过静态规则
|
| 73 |
+
@spaces.GPU
|
| 74 |
+
def foo():
|
| 75 |
+
pass
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
huggingface-hub
|