Spaces:
Sleeping
Sleeping
Trying ray
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
-
|
5 |
|
6 |
|
7 |
# Use a pipeline as a high-level helper
|
@@ -13,6 +13,7 @@ print("RUNNING PIPE")
|
|
13 |
pipe = pipeline("text-generation", model="NousResearch/Hermes-3-Llama-3.1-8B", max_new_tokens=200, device=0)
|
14 |
print("PIPE DONE")
|
15 |
|
|
|
16 |
@spaces.GPU(duration=120)
|
17 |
def llama3_1_8B(question):
|
18 |
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
+
import ray
|
5 |
|
6 |
|
7 |
# Use a pipeline as a high-level helper
|
|
|
13 |
pipe = pipeline("text-generation", model="NousResearch/Hermes-3-Llama-3.1-8B", max_new_tokens=200, device=0)
|
14 |
print("PIPE DONE")
|
15 |
|
16 |
+
@ray.remote(num_gpus=1, max_calls=1)
|
17 |
@spaces.GPU(duration=120)
|
18 |
def llama3_1_8B(question):
|
19 |
|