Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import gradio as gr
|
|
2 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
3 |
|
4 |
# Load tokenizer and model
|
5 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
6 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("
|
7 |
|
8 |
def generate_sql(query):
|
9 |
input_text = "translate English to SQL: " + query
|
@@ -17,8 +17,8 @@ interface = gr.Interface(
|
|
17 |
fn=generate_sql,
|
18 |
inputs=gr.Textbox(lines=2, placeholder="Enter your natural language query here..."),
|
19 |
outputs="text",
|
20 |
-
title="NL to SQL with
|
21 |
-
description="This model converts natural language queries into SQL. Enter your query!"
|
22 |
)
|
23 |
|
24 |
# Launch the app
|
|
|
2 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
3 |
|
4 |
# Load tokenizer and model
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained("hrshtsharma2012/NL2SQL-Picard-final")
|
6 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("hrshtsharma2012/NL2SQL-Picard-final")
|
7 |
|
8 |
def generate_sql(query):
|
9 |
input_text = "translate English to SQL: " + query
|
|
|
17 |
fn=generate_sql,
|
18 |
inputs=gr.Textbox(lines=2, placeholder="Enter your natural language query here..."),
|
19 |
outputs="text",
|
20 |
+
title="NL to SQL with Picard",
|
21 |
+
description="This model converts natural language queries into SQL using the Picard model. Enter your query!"
|
22 |
)
|
23 |
|
24 |
# Launch the app
|