K7Ploypailin commited on
Commit
02ee7d8
·
1 Parent(s): 603c45b

Add application file

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -108,7 +108,7 @@ def generate_typhoon_response(character_name, confidence):
108
 
109
  output_ids = llm_model.generate(
110
  input_ids,
111
- max_new_tokens=100,
112
  temperature=0.7,
113
  do_sample=True,
114
  pad_token_id=llm_tokenizer.eos_token_id,
@@ -159,7 +159,7 @@ def predict_one_piece_character(pil_image):
159
  interface = gr.Interface(
160
  fn=predict_one_piece_character,
161
  inputs=gr.Image(type="pil", label="อัปโหลดรูปภาพตัวละครวันพีซ"),
162
- outputs=gr.Textbox(label="ผลการทำนายชื่อตัวละคร (Typhoon 2.5 Local)"),
163
  title="🏴‍☠️ One Piece Classifier (ConvNeXt ONNX + Typhoon 2.5 Local)",
164
  description="แอปพลิเคชันจำแนกตัวละครวันพีซโดยรัน LLM ภายใน Space"
165
  )
 
108
 
109
  output_ids = llm_model.generate(
110
  input_ids,
111
+ max_new_tokens=256,
112
  temperature=0.7,
113
  do_sample=True,
114
  pad_token_id=llm_tokenizer.eos_token_id,
 
159
  interface = gr.Interface(
160
  fn=predict_one_piece_character,
161
  inputs=gr.Image(type="pil", label="อัปโหลดรูปภาพตัวละครวันพีซ"),
162
+ outputs=gr.Textbox(label="ผลการทำนายชื่อตัวละคร (Typhoon 2.5 Local)", lines=5),
163
  title="🏴‍☠️ One Piece Classifier (ConvNeXt ONNX + Typhoon 2.5 Local)",
164
  description="แอปพลิเคชันจำแนกตัวละครวันพีซโดยรัน LLM ภายใน Space"
165
  )