Update app.py
Browse files
app.py
CHANGED
@@ -9,13 +9,13 @@ You can also use 👨🏻⚕️❤️🩹🧑🏻⚕️Meditron by clon
|
|
9 |
Join us : 🌟TeamTonic🌟 is always making cool demos! Join our active builder's🛠️community 👻[![Let's build the future of AI together! 🚀🤖](https://discordapp.com/api/guilds/1109943800132010065/widget.png)](https://discord.gg/GWpVpekp) On 🤗Huggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Polytonic](https://github.com/tonic-ai) & contribute to 🌟 [Poly](https://github.com/tonic-ai/poly) 🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗
|
10 |
"""
|
11 |
|
12 |
-
@spaces.GPU
|
13 |
class SQLQueryGenerator:
|
14 |
def __init__(self, model_name, prompt_file="prompt.md", metadata_file="metadata.sql"):
|
15 |
self.tokenizer, self.model = self.get_tokenizer_model(model_name)
|
16 |
self.prompt_file = prompt_file
|
17 |
self.metadata_file = metadata_file
|
18 |
-
|
|
|
19 |
def get_tokenizer_model(self, model_name):
|
20 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
21 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
9 |
Join us : 🌟TeamTonic🌟 is always making cool demos! Join our active builder's🛠️community 👻[![Let's build the future of AI together! 🚀🤖](https://discordapp.com/api/guilds/1109943800132010065/widget.png)](https://discord.gg/GWpVpekp) On 🤗Huggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Polytonic](https://github.com/tonic-ai) & contribute to 🌟 [Poly](https://github.com/tonic-ai/poly) 🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗
|
10 |
"""
|
11 |
|
|
|
12 |
class SQLQueryGenerator:
|
13 |
def __init__(self, model_name, prompt_file="prompt.md", metadata_file="metadata.sql"):
|
14 |
self.tokenizer, self.model = self.get_tokenizer_model(model_name)
|
15 |
self.prompt_file = prompt_file
|
16 |
self.metadata_file = metadata_file
|
17 |
+
|
18 |
+
@spaces.GPU
|
19 |
def get_tokenizer_model(self, model_name):
|
20 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
21 |
model = AutoModelForCausalLM.from_pretrained(
|