Rausda6 commited on
Commit
20beb72
·
verified ·
1 Parent(s): 0883ce3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -290,11 +290,11 @@ Requirements:
290
  - {language_instruction}
291
 
292
  Example JSON structure:
293
- {json.dumps(example_json)}
 
 
 
294
 
295
- Topic: {prompt}
296
-
297
- JSON:"""
298
 
299
  try:
300
  if progress:
@@ -304,7 +304,7 @@ JSON:"""
304
 
305
  # Tokenize with proper handling
306
  inputs = self.tokenizer(
307
- system_prompt,
308
  return_tensors="pt",
309
  padding=True,
310
  truncation=True,
 
290
  - {language_instruction}
291
 
292
  Example JSON structure:
293
+ {json.dumps(example_json, indent=2)}
294
+ """
295
+ user_prompt = f"\nTopic: {prompt}\nJSON:"
296
+ full_prompt = system_prompt + user_prompt
297
 
 
 
 
298
 
299
  try:
300
  if progress:
 
304
 
305
  # Tokenize with proper handling
306
  inputs = self.tokenizer(
307
+ full_prompt,
308
  return_tensors="pt",
309
  padding=True,
310
  truncation=True,