Spaces:
Running
on
Zero
Running
on
Zero
BoboiAzumi
commited on
Commit
·
11ad142
1
Parent(s):
f13c42f
fix
Browse files- process.py +2 -0
- requirements.txt +2 -1
process.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import io
|
|
|
2 |
import argparse
|
3 |
import numpy as np
|
4 |
import torch
|
@@ -67,6 +68,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
67 |
device_map="auto"
|
68 |
).eval()
|
69 |
|
|
|
70 |
def predict(prompt, video_data, temperature):
|
71 |
strategy = 'chat'
|
72 |
video = load_video(video_data, strategy=strategy)
|
|
|
1 |
import io
|
2 |
+
import spaces
|
3 |
import argparse
|
4 |
import numpy as np
|
5 |
import torch
|
|
|
68 |
device_map="auto"
|
69 |
).eval()
|
70 |
|
71 |
+
@spaces.GPU
|
72 |
def predict(prompt, video_data, temperature):
|
73 |
strategy = 'chat'
|
74 |
video = load_video(video_data, strategy=strategy)
|
requirements.txt
CHANGED
@@ -22,4 +22,5 @@ gevent
|
|
22 |
requests
|
23 |
gradio
|
24 |
accelerate
|
25 |
-
bitsandbytes>=0.39.0
|
|
|
|
22 |
requests
|
23 |
gradio
|
24 |
accelerate
|
25 |
+
bitsandbytes>=0.39.0
|
26 |
+
spaces
|