Update app.py
Browse files
app.py
CHANGED
@@ -86,9 +86,9 @@ sql_model_name = "microsoft/tapex-large-finetuned-wtq"
|
|
86 |
sql_tokenizer = TapexTokenizer.from_pretrained(sql_model_name)
|
87 |
sql_model = BartForConditionalGeneration.from_pretrained(sql_model_name)
|
88 |
|
89 |
-
stokenizer = AutoTokenizer.from_pretrained(sql_model_name)
|
90 |
-
max_token_limit = stokenizer.max_model_input_sizes[sql_model_name]
|
91 |
-
print(f"SQL Maximum token limit for {sql_model_name}: {max_token_limit}")
|
92 |
|
93 |
#sql_response = None
|
94 |
conversation_history = []
|
@@ -153,6 +153,7 @@ def sqlquery(input): #, history=[]):
|
|
153 |
conversation = "\n".join([f"{sender}: {msg}" for sender, msg in conversation_history])
|
154 |
|
155 |
return conversation
|
|
|
156 |
#return sql_response, history
|
157 |
|
158 |
'''
|
|
|
86 |
sql_tokenizer = TapexTokenizer.from_pretrained(sql_model_name)
|
87 |
sql_model = BartForConditionalGeneration.from_pretrained(sql_model_name)
|
88 |
|
89 |
+
#stokenizer = AutoTokenizer.from_pretrained(sql_model_name)
|
90 |
+
#max_token_limit = stokenizer.max_model_input_sizes[sql_model_name]
|
91 |
+
#print(f"SQL Maximum token limit for {sql_model_name}: {max_token_limit}")
|
92 |
|
93 |
#sql_response = None
|
94 |
conversation_history = []
|
|
|
153 |
conversation = "\n".join([f"{sender}: {msg}" for sender, msg in conversation_history])
|
154 |
|
155 |
return conversation
|
156 |
+
|
157 |
#return sql_response, history
|
158 |
|
159 |
'''
|