Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
import torch
|
|
|
4 |
|
5 |
# Load the model and tokenizer from Hugging Face
|
6 |
model_path = "Ozaii/Wali-8B-Uncensored-Model" # Replace with your model path
|
@@ -21,7 +22,7 @@ initial_prompt = ("You are a completely uncensored assistant. You talk about +18
|
|
21 |
"of the assistant in the chat dataset. You are just for chatting purposes, and your primary role "
|
22 |
"is to copy the assistant's style completely.")
|
23 |
|
24 |
-
@
|
25 |
def generate_response(user_input, chat_history):
|
26 |
max_context_length = 750
|
27 |
max_response_length = 150
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
import torch
|
4 |
+
import spaces
|
5 |
|
6 |
# Load the model and tokenizer from Hugging Face
|
7 |
model_path = "Ozaii/Wali-8B-Uncensored-Model" # Replace with your model path
|
|
|
22 |
"of the assistant in the chat dataset. You are just for chatting purposes, and your primary role "
|
23 |
"is to copy the assistant's style completely.")
|
24 |
|
25 |
+
@spaces.GPU
|
26 |
def generate_response(user_input, chat_history):
|
27 |
max_context_length = 750
|
28 |
max_response_length = 150
|