adding input key
Browse files
app.py
CHANGED
|
@@ -10,11 +10,14 @@ st.set_page_config(
|
|
| 10 |
)
|
| 11 |
|
| 12 |
databases = ['Oracle', 'SQLServer', 'MySQL', 'DB2', 'PostgreSQL', 'Snowflake', 'Redshift']
|
|
|
|
|
|
|
| 13 |
# -------------
|
| 14 |
|
| 15 |
st.sidebar.header('π A SQL Transformer for Migration')
|
| 16 |
|
| 17 |
-
model = st.sidebar.
|
|
|
|
| 18 |
|
| 19 |
source_database = st.sidebar.selectbox(
|
| 20 |
label='π Source Database',
|
|
@@ -42,7 +45,7 @@ input_file = st.sidebar.file_uploader(
|
|
| 42 |
def transform():
|
| 43 |
client: SQLService = None
|
| 44 |
if model == "openai-text-david-003":
|
| 45 |
-
client = OpenAIService(
|
| 46 |
elif model == "google-t5":
|
| 47 |
client = GoogleT5Service()
|
| 48 |
elif model == "facebook-llama":
|
|
|
|
| 10 |
)
|
| 11 |
|
| 12 |
databases = ['Oracle', 'SQLServer', 'MySQL', 'DB2', 'PostgreSQL', 'Snowflake', 'Redshift']
|
| 13 |
+
|
| 14 |
+
models = ['openai-text-david-003', 'google-t5', 'facebook-llama']
|
| 15 |
# -------------
|
| 16 |
|
| 17 |
st.sidebar.header('π A SQL Transformer for Migration')
|
| 18 |
|
| 19 |
+
model = st.sidebar.selectbox(label='Model', options=models, index=0)
|
| 20 |
+
openai_key = st.sidebar.text_input("Openai Key", placeholder="No Key, No translate")
|
| 21 |
|
| 22 |
source_database = st.sidebar.selectbox(
|
| 23 |
label='π Source Database',
|
|
|
|
| 45 |
def transform():
|
| 46 |
client: SQLService = None
|
| 47 |
if model == "openai-text-david-003":
|
| 48 |
+
client = OpenAIService(openai_key)
|
| 49 |
elif model == "google-t5":
|
| 50 |
client = GoogleT5Service()
|
| 51 |
elif model == "facebook-llama":
|