Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
6 |
tokenizer = AutoTokenizer.from_pretrained("ping98k/typhoon-7b-rag-instruct-th")
|
7 |
model = AutoModelForCausalLM.from_pretrained("ping98k/typhoon-7b-rag-instruct-th", device_map={"": 0})
|
8 |
|
9 |
-
|
10 |
def response(instruction, history, inputText):
|
11 |
inp = f"""### Instruction:
|
12 |
{instruction}
|
|
|
6 |
tokenizer = AutoTokenizer.from_pretrained("ping98k/typhoon-7b-rag-instruct-th")
|
7 |
model = AutoModelForCausalLM.from_pretrained("ping98k/typhoon-7b-rag-instruct-th", device_map={"": 0})
|
8 |
|
9 |
+
@spaces.GPU(duration=120)
|
10 |
def response(instruction, history, inputText):
|
11 |
inp = f"""### Instruction:
|
12 |
{instruction}
|