Spaces:
Sleeping
Sleeping
GPU initialized
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ processor = AutoProcessor.from_pretrained(model_name, use_auth_token=HF_TOKEN)
|
|
54 |
# # Decode the output to return the final response
|
55 |
# response = processor.decode(outputs[0], skip_special_tokens=True)
|
56 |
# return response
|
57 |
-
|
58 |
def predict_text(text):
|
59 |
# Prepare the input messages
|
60 |
messages = [{"role": "user", "content": [{"type": "text", "text": text}]}]
|
|
|
54 |
# # Decode the output to return the final response
|
55 |
# response = processor.decode(outputs[0], skip_special_tokens=True)
|
56 |
# return response
|
57 |
+
@spaces.GPU
|
58 |
def predict_text(text):
|
59 |
# Prepare the input messages
|
60 |
messages = [{"role": "user", "content": [{"type": "text", "text": text}]}]
|