update handle py
#16
by
ismailhakki37
- opened
- handler.py +0 -2
handler.py
CHANGED
|
@@ -31,7 +31,6 @@ from llava.mm_utils import (
|
|
| 31 |
KeywordsStoppingCriteria,
|
| 32 |
)
|
| 33 |
|
| 34 |
-
import spaces
|
| 35 |
from huggingface_hub import HfApi
|
| 36 |
from huggingface_hub import login
|
| 37 |
from huggingface_hub import revision_exists
|
|
@@ -232,7 +231,6 @@ def add_message(message_text, image_input=None):
|
|
| 232 |
|
| 233 |
return {"status": "success", "message": "Message added"}
|
| 234 |
|
| 235 |
-
@spaces.GPU
|
| 236 |
def generate_response(message_text, image_input, temperature=0.05, top_p=1.0, max_output_tokens=4096):
|
| 237 |
"""Generate response for the given message and image"""
|
| 238 |
try:
|
|
|
|
| 31 |
KeywordsStoppingCriteria,
|
| 32 |
)
|
| 33 |
|
|
|
|
| 34 |
from huggingface_hub import HfApi
|
| 35 |
from huggingface_hub import login
|
| 36 |
from huggingface_hub import revision_exists
|
|
|
|
| 231 |
|
| 232 |
return {"status": "success", "message": "Message added"}
|
| 233 |
|
|
|
|
| 234 |
def generate_response(message_text, image_input, temperature=0.05, top_p=1.0, max_output_tokens=4096):
|
| 235 |
"""Generate response for the given message and image"""
|
| 236 |
try:
|