Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,16 +50,11 @@ tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=gguf_filename)
|
|
| 50 |
model = AutoModelForCausalLM.from_pretrained(
|
| 51 |
model_id,
|
| 52 |
gguf_file=gguf_filename,
|
| 53 |
-
torch_dtype=
|
| 54 |
-
)
|
| 55 |
-
|
| 56 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 57 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 58 |
-
model_name,
|
| 59 |
-
torch_dtype="auto",
|
| 60 |
device_map="auto"
|
| 61 |
)
|
| 62 |
|
|
|
|
| 63 |
# --- Basic Agent Definition ---
|
| 64 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 65 |
class BasicAgent:
|
|
|
|
| 50 |
model = AutoModelForCausalLM.from_pretrained(
|
| 51 |
model_id,
|
| 52 |
gguf_file=gguf_filename,
|
| 53 |
+
torch_dtype="auto", # Adjust based on your hardware capabilities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
device_map="auto"
|
| 55 |
)
|
| 56 |
|
| 57 |
+
|
| 58 |
# --- Basic Agent Definition ---
|
| 59 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 60 |
class BasicAgent:
|