Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,10 +38,6 @@ model_name = "daekeun-ml/Llama-2-ko-instruct-13B"
|
|
38 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
39 |
|
40 |
model = None
|
41 |
-
def init():
|
42 |
-
if check:
|
43 |
-
model = AutoDistributedModelForCausalLM.from_pretrained(model_name)
|
44 |
-
|
45 |
|
46 |
def check(model_name):
|
47 |
data = requests.get("https://health.petals.dev/api/v1/state").json()
|
@@ -52,6 +48,10 @@ def check(model_name):
|
|
52 |
return True
|
53 |
return False
|
54 |
|
|
|
|
|
|
|
|
|
55 |
|
56 |
def chat(id, npc, prompt):
|
57 |
if model == None:
|
|
|
38 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
39 |
|
40 |
model = None
|
|
|
|
|
|
|
|
|
41 |
|
42 |
def check(model_name):
|
43 |
data = requests.get("https://health.petals.dev/api/v1/state").json()
|
|
|
48 |
return True
|
49 |
return False
|
50 |
|
51 |
+
def init():
|
52 |
+
if check(model_name):
|
53 |
+
model = AutoDistributedModelForCausalLM.from_pretrained(model_name)
|
54 |
+
|
55 |
|
56 |
def chat(id, npc, prompt):
|
57 |
if model == None:
|