Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,10 @@ destination_folder = "./models"
|
|
| 22 |
# Copy the file
|
| 23 |
shutil.copy(source_file, destination_folder)
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
model_path = "./models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf" # Adjust if necessary
|
| 26 |
|
| 27 |
if os.path.exists(model_path):
|
|
@@ -55,7 +59,7 @@ print(datetime.fromtimestamp(time.time()))
|
|
| 55 |
model_name = "TheBloke/TinyLlama-1.1B-Chat-GGUF" # Change if using a different version
|
| 56 |
#model_name = "TinyLlama/TinyLlama-1.1B-Chat-v1.0" # Change if using a different version
|
| 57 |
#model_name = "microsoft/phi-1_5" # Change if using a different version
|
| 58 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 59 |
|
| 60 |
print("tokenizer")
|
| 61 |
print(datetime.fromtimestamp(time.time()))
|
|
|
|
| 22 |
# Copy the file
|
| 23 |
shutil.copy(source_file, destination_folder)
|
| 24 |
|
| 25 |
+
source_file = "config.json"
|
| 26 |
+
# Copy the file
|
| 27 |
+
shutil.copy(source_file, destination_folder)
|
| 28 |
+
|
| 29 |
model_path = "./models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf" # Adjust if necessary
|
| 30 |
|
| 31 |
if os.path.exists(model_path):
|
|
|
|
| 59 |
model_name = "TheBloke/TinyLlama-1.1B-Chat-GGUF" # Change if using a different version
|
| 60 |
#model_name = "TinyLlama/TinyLlama-1.1B-Chat-v1.0" # Change if using a different version
|
| 61 |
#model_name = "microsoft/phi-1_5" # Change if using a different version
|
| 62 |
+
model = AutoModelForCausalLM.from_pretrained(destination_folder, model_type="tinyllama")
|
| 63 |
|
| 64 |
print("tokenizer")
|
| 65 |
print(datetime.fromtimestamp(time.time()))
|