Spaces:
Runtime error
Runtime error
burtenshaw
commited on
Commit
·
8a563d0
1
Parent(s):
b6a9f2e
fix model variable
Browse files- app/app.py +2 -2
app/app.py
CHANGED
|
@@ -47,8 +47,8 @@ def create_inference_client(
|
|
| 47 |
InferenceClient: Configured client instance
|
| 48 |
"""
|
| 49 |
if ZERO_GPU:
|
| 50 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 51 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 52 |
return pipeline("text-generation", model=model, tokenizer=tokenizer)
|
| 53 |
else:
|
| 54 |
return InferenceClient(
|
|
|
|
| 47 |
InferenceClient: Configured client instance
|
| 48 |
"""
|
| 49 |
if ZERO_GPU:
|
| 50 |
+
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
|
| 51 |
+
model = AutoModelForCausalLM.from_pretrained(BASE_MODEL, load_in_4bit=True)
|
| 52 |
return pipeline("text-generation", model=model, tokenizer=tokenizer)
|
| 53 |
else:
|
| 54 |
return InferenceClient(
|