Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,10 @@ import spaces
|
|
4 |
from unsloth import FastLanguageModel
|
5 |
from transformers import AutoTokenizer
|
6 |
|
|
|
|
|
|
|
|
|
7 |
# Load your fine-tuned Phi-3 model from Hugging Face
|
8 |
MODEL_NAME = "jcrissa/phi3-new-t2i"
|
9 |
|
@@ -39,7 +43,6 @@ phi3_model, phi3_tokenizer = load_phi3_model()
|
|
39 |
if phi3_model is None or phi3_tokenizer is None:
|
40 |
raise RuntimeError("Model and tokenizer could not be loaded. Please check the Hugging Face model path or network connection.")
|
41 |
|
42 |
-
@spaces.GPU(duration=120)
|
43 |
# Function to generate text using Phi-3
|
44 |
def generate(plain_text):
|
45 |
try:
|
|
|
4 |
from unsloth import FastLanguageModel
|
5 |
from transformers import AutoTokenizer
|
6 |
|
7 |
+
@spaces.GPU
|
8 |
+
def dummy(): # just a dummy
|
9 |
+
pass
|
10 |
+
|
11 |
# Load your fine-tuned Phi-3 model from Hugging Face
|
12 |
MODEL_NAME = "jcrissa/phi3-new-t2i"
|
13 |
|
|
|
43 |
if phi3_model is None or phi3_tokenizer is None:
|
44 |
raise RuntimeError("Model and tokenizer could not be loaded. Please check the Hugging Face model path or network connection.")
|
45 |
|
|
|
46 |
# Function to generate text using Phi-3
|
47 |
def generate(plain_text):
|
48 |
try:
|