Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
5 |
pipe = pipeline("text2text-generation", model="google/flan-t5-base")
|
6 |
|
7 |
def convert_to_json(text):
|
8 |
-
prompt = f"Convert
|
9 |
output = pipe(prompt, max_new_tokens=200)[0]["generated_text"]
|
10 |
return output
|
11 |
|
|
|
5 |
pipe = pipeline("text2text-generation", model="google/flan-t5-base")
|
6 |
|
7 |
def convert_to_json(text):
|
8 |
+
prompt = f"Convert the following sentence into a JSON object with keys: userId, type, category, amount, date, note. ": {text}"
|
9 |
output = pipe(prompt, max_new_tokens=200)[0]["generated_text"]
|
10 |
return output
|
11 |
|