gpu
Browse files
app.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
|
|
|
| 3 |
def predict(text):
|
| 4 |
return text.upper()
|
| 5 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
|
| 4 |
+
@spaces.GPU
|
| 5 |
def predict(text):
|
| 6 |
return text.upper()
|
| 7 |
|
test.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from gradio_client import Client
|
| 2 |
+
|
| 3 |
+
client = Client("Devmurari/document")
|
| 4 |
+
|
| 5 |
+
result = client.predict(
|
| 6 |
+
"hello",
|
| 7 |
+
api_name="/predict"
|
| 8 |
+
)
|
| 9 |
+
|
| 10 |
+
print(result)
|