osmankoc commited on
Commit
6f3a481
·
1 Parent(s): 8358801

fix messages

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -14,10 +14,11 @@ model = AutoModelForCausalLM.from_pretrained(
14
  # ZeroGPU için model GPU'ya sadece gerektiğinde yüklenecek
15
  @spaces.GPU
16
  def generate(prompt):
17
- messages = [
18
- {"role": "system", "content": "You are HTML Web Developer. enerate HTML code using Tailwind CSS framework and Shadcn UI components. Add HTML tags to the code. Don't forget to use the correct classes. Don't write inline styles and descriptions."},
19
- {"role": "user", "content": prompt}
20
- ]
 
21
  # text = tokenizer.apply_chat_template(
22
  # messages,
23
  # tokenize=False,
 
14
  # ZeroGPU için model GPU'ya sadece gerektiğinde yüklenecek
15
  @spaces.GPU
16
  def generate(prompt):
17
+ messages = "You are HTML Web Developer. Generate HTML code using Tailwind CSS framework and Shadcn UI components. Add HTML tags to the code. Don't forget to use the correct classes. Don't write inline styles and descriptions. Here user's prompt: " + prompt
18
+ # messages = [
19
+ # {"role": "system", "content": "You are HTML Web Developer. enerate HTML code using Tailwind CSS framework and Shadcn UI components. Add HTML tags to the code. Don't forget to use the correct classes. Don't write inline styles and descriptions."},
20
+ # {"role": "user", "content": prompt}
21
+ # ]
22
  # text = tokenizer.apply_chat_template(
23
  # messages,
24
  # tokenize=False,