Teja9398 commited on
Commit
8cbd58d
·
verified ·
1 Parent(s): 25f495e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 this to JSON: {text}"
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