HOJOON23 commited on
Commit
47e2f84
ยท
verified ยท
1 Parent(s): 49a2293

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, max_length=100, do_sample=True, temperature=0.3)
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}"