Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
|
|
3 |
|
4 |
# ๋ชจ๋ธ ๋ก๋
|
5 |
try:
|
6 |
-
generator = pipeline("text-generation", model="bigscience/bloomz-560m") #
|
7 |
except Exception as e:
|
8 |
generator = None
|
9 |
error_message = f"๋ชจ๋ธ ๋ก๋ ์ค๋ฅ: {str(e)}"
|
@@ -23,7 +23,7 @@ def generate_reply(review):
|
|
23 |
|
24 |
try:
|
25 |
# ๋ชจ๋ธ ํธ์ถ
|
26 |
-
result = generator(prompt,
|
27 |
|
28 |
# ๋๋ฒ๊น
์ ๋ณด ์ถ๋ ฅ
|
29 |
debug_info = f"์
๋ ฅ๋ ํ๋กฌํํธ: {prompt}\n๋ชจ๋ธ ์๋ต: {result}"
|
|
|
3 |
|
4 |
# ๋ชจ๋ธ ๋ก๋
|
5 |
try:
|
6 |
+
generator = pipeline("text-generation", model="bigscience/bloomz-560m") # ํ์์ ๋ฐ๋ผ ๋ชจ๋ธ ๋ณ๊ฒฝ
|
7 |
except Exception as e:
|
8 |
generator = None
|
9 |
error_message = f"๋ชจ๋ธ ๋ก๋ ์ค๋ฅ: {str(e)}"
|
|
|
23 |
|
24 |
try:
|
25 |
# ๋ชจ๋ธ ํธ์ถ
|
26 |
+
result = generator(prompt, max_new_tokens=50, do_sample=True, temperature=0.7)
|
27 |
|
28 |
# ๋๋ฒ๊น
์ ๋ณด ์ถ๋ ฅ
|
29 |
debug_info = f"์
๋ ฅ๋ ํ๋กฌํํธ: {prompt}\n๋ชจ๋ธ ์๋ต: {result}"
|