davidmezzetti commited on
Commit
29622e1
1 Parent(s): b5e77ce

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ from transformers import pipeline
4
+
5
+ query = st.text_input("Query")
6
+
7
+ nlp = pipeline("text2text-generation", model="t5-small-txtsql")
8
+ text = nlp(f"translate English to SQL: {query}", max_length=512)[0]["generated_text"]
9
+ st.write(text.replace("$=", "<="))