Spaces:
Runtime error
Runtime error
hanzla javaid
commited on
Commit
•
cb04c4c
1
Parent(s):
d747da0
updates
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
import logging
|
5 |
-
import spaces
|
6 |
|
7 |
# Configure logging
|
8 |
logging.basicConfig(level=logging.INFO)
|
@@ -34,7 +33,6 @@ def load_all_models():
|
|
34 |
except Exception as e:
|
35 |
logger.error(f"Failed to load model {model_name}: {e}")
|
36 |
|
37 |
-
@spaces.GPU
|
38 |
def get_model_response(model_name, message):
|
39 |
"""
|
40 |
Generates a response from the specified model given a user message.
|
|
|
2 |
import torch
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
import logging
|
|
|
5 |
|
6 |
# Configure logging
|
7 |
logging.basicConfig(level=logging.INFO)
|
|
|
33 |
except Exception as e:
|
34 |
logger.error(f"Failed to load model {model_name}: {e}")
|
35 |
|
|
|
36 |
def get_model_response(model_name, message):
|
37 |
"""
|
38 |
Generates a response from the specified model given a user message.
|