Spaces:
Paused
Paused
Update app.py
Browse files
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 |
-
|
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,
|