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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,10 +2,10 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  # Load the model
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
 
 
2
  from transformers import pipeline
3
 
4
  # Load the model
5
+ pipe = pipeline("text2text-generation", model="declare-lab/flan-alpaca-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