Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,18 +22,18 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
|
| 22 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 23 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
| 24 |
|
| 25 |
-
model_name = "
|
| 26 |
|
| 27 |
model = AutoModelForCausalLM.from_pretrained(
|
| 28 |
model_name,
|
| 29 |
torch_dtype=torch.float16,
|
| 30 |
device_map="auto"
|
| 31 |
)
|
| 32 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
-
@spaces.GPU(duration=
|
| 37 |
def generate(
|
| 38 |
message: str,
|
| 39 |
chat_history: list[tuple[str, str]],
|
|
|
|
| 22 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 23 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
| 24 |
|
| 25 |
+
model_name = "ehristoforu/rufalcon3-3b-it"
|
| 26 |
|
| 27 |
model = AutoModelForCausalLM.from_pretrained(
|
| 28 |
model_name,
|
| 29 |
torch_dtype=torch.float16,
|
| 30 |
device_map="auto"
|
| 31 |
)
|
| 32 |
+
tokenizer = AutoTokenizer.from_pretrained("ehristoforu/rufalcon3-3b-it")
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
+
@spaces.GPU(duration=60)
|
| 37 |
def generate(
|
| 38 |
message: str,
|
| 39 |
chat_history: list[tuple[str, str]],
|