Commit ·
58966c7
1
Parent(s): 6f3695f
update file 037
Browse files
app.py
CHANGED
|
@@ -13,8 +13,8 @@ from io import StringIO, BytesIO
|
|
| 13 |
app = Flask(__name__)
|
| 14 |
|
| 15 |
# Load model (CPU)
|
| 16 |
-
|
| 17 |
-
generator = pipeline("text-generation", model="bigscience/bloomz-560m", device=-1)
|
| 18 |
|
| 19 |
# Directories
|
| 20 |
os.makedirs("logs", exist_ok=True)
|
|
@@ -84,7 +84,7 @@ def generate_ticket():
|
|
| 84 |
issue=issue
|
| 85 |
)
|
| 86 |
|
| 87 |
-
raw = generator(prompt,max_new_tokens=
|
| 88 |
|
| 89 |
# Strip the prompt itself, leaving only the new content
|
| 90 |
if raw.startswith(prompt):
|
|
|
|
| 13 |
app = Flask(__name__)
|
| 14 |
|
| 15 |
# Load model (CPU)
|
| 16 |
+
generator = pipeline("text-generation", model="EleutherAI/gpt-neo-1.3B", device=-1)
|
| 17 |
+
# generator = pipeline("text-generation", model="bigscience/bloomz-560m", device=-1)
|
| 18 |
|
| 19 |
# Directories
|
| 20 |
os.makedirs("logs", exist_ok=True)
|
|
|
|
| 84 |
issue=issue
|
| 85 |
)
|
| 86 |
|
| 87 |
+
raw = generator(prompt,max_new_tokens=250,do_sample=True, top_p=0.9,return_full_text=False)[0]["generated_text"]
|
| 88 |
|
| 89 |
# Strip the prompt itself, leaving only the new content
|
| 90 |
if raw.startswith(prompt):
|