Spaces:
Runtime error
Runtime error
Ibrahemqasim
commited on
Commit
•
f2f8e53
1
Parent(s):
d83050f
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ from peft import prepare_model_for_kbit_training
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
model_path = "inception-mbzuai/jais-13b-chat"
|
6 |
|
7 |
-
prompt_eng = "### Instruction:
|
8 |
-
prompt_ar
|
9 |
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
@@ -39,3 +39,4 @@ def greet():
|
|
39 |
ques= input()
|
40 |
text = prompt_ar.format_map({'Question':ques})
|
41 |
return get_response(text)
|
|
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
model_path = "inception-mbzuai/jais-13b-chat"
|
6 |
|
7 |
+
prompt_eng = "### Instruction: \n\nComplete the conversation below between [|Human|] and [|AI|]:\n### Input: [|Human|] {Question}\n### Response: [|AI|]"
|
8 |
+
prompt_ar = "### Instruction: \n\nأكمل المحادثة أدناه بين [|Human|] و [|AI|]:\n### Input: [|Human|] {Question}\n### Response: [|AI|]"
|
9 |
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
|
|
39 |
ques= input()
|
40 |
text = prompt_ar.format_map({'Question':ques})
|
41 |
return get_response(text)
|
42 |
+
|