Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ import re
|
|
6 |
import random
|
7 |
|
8 |
# Initialize the model
|
9 |
-
model = AutoModelForCausalLM.from_pretrained("Detsutut/Igea-1B-instruct-v0.
|
10 |
-
tokenizer = AutoTokenizer.from_pretrained( "Detsutut/Igea-1B-instruct-v0.
|
11 |
|
12 |
|
13 |
gen_pipeline = pipeline(
|
@@ -35,7 +35,7 @@ alpaca_instruct_prompt = """{}
|
|
35 |
{}"""
|
36 |
|
37 |
# Define the function to generate text
|
38 |
-
def generate_text(input_text, max_new_tokens=
|
39 |
|
40 |
if len(system_prompt)>0:
|
41 |
system_str = system_prompt
|
|
|
6 |
import random
|
7 |
|
8 |
# Initialize the model
|
9 |
+
model = AutoModelForCausalLM.from_pretrained("Detsutut/Igea-1B-instruct-v0.3-test4epochs-GGUF", model_file="unsloth.Q4_K_M.gguf", model_type="mistral", hf=True)
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained( "Detsutut/Igea-1B-instruct-v0.3")
|
11 |
|
12 |
|
13 |
gen_pipeline = pipeline(
|
|
|
35 |
{}"""
|
36 |
|
37 |
# Define the function to generate text
|
38 |
+
def generate_text(input_text, max_new_tokens=512, temperature=1, system_prompt=""):
|
39 |
|
40 |
if len(system_prompt)>0:
|
41 |
system_str = system_prompt
|