File size: 323 Bytes
29622e1
 
 
 
4dc99f0
29622e1
95a7058
29622e1
df0005c
1
2
3
4
5
6
7
8
9
10
import streamlit as st

from transformers import pipeline

query = st.text_input("Query", value="feel good story since yesterday")

nlp = pipeline("text2text-generation", model="NeuML/t5-small-txtsql")
text = nlp(f"translate English to SQL: {query}", max_length=512)[0]["generated_text"]
st.write(text.replace('$=', '<='))