Spaces:
Running
on
Zero
Running
on
Zero
mjavaid
commited on
Commit
·
322634a
1
Parent(s):
6aea303
add
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import subprocess
|
3 |
import sys
|
4 |
import os
|
|
|
5 |
|
6 |
# Install the necessary packages that require CUDA
|
7 |
try:
|
@@ -50,6 +51,8 @@ if model is None:
|
|
50 |
else:
|
51 |
print("Model loaded successfully!")
|
52 |
|
|
|
|
|
53 |
def generate_response(message, history):
|
54 |
if model is None:
|
55 |
return "Sorry, the model could not be loaded. Please check the logs."
|
|
|
2 |
import subprocess
|
3 |
import sys
|
4 |
import os
|
5 |
+
import spaces
|
6 |
|
7 |
# Install the necessary packages that require CUDA
|
8 |
try:
|
|
|
51 |
else:
|
52 |
print("Model loaded successfully!")
|
53 |
|
54 |
+
|
55 |
+
@spaces.GPU
|
56 |
def generate_response(message, history):
|
57 |
if model is None:
|
58 |
return "Sorry, the model could not be loaded. Please check the logs."
|