afrizalha commited on
Commit
f7aecd4
1 Parent(s): 528ec57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -23,8 +23,9 @@ def generate(query, temp, top_p):
23
  do_sample=True,
24
  temperature=temp,
25
  top_p=top_p)
26
- outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
27
  return outputs
 
28
  with gr.Blocks(theme=gr.themes.Soft()) as app:
29
  input = gr.Textbox(label="Prompt", value="Pripun kulo saged nyinaoni Basa Jawa kanthi sae?")
30
  output = gr.Textbox(label="Response", scale=2)
 
23
  do_sample=True,
24
  temperature=temp,
25
  top_p=top_p)
26
+ outputs = tokenizer.decode(outputs[0][input_length:], skip_special_tokens=True)
27
  return outputs
28
+
29
  with gr.Blocks(theme=gr.themes.Soft()) as app:
30
  input = gr.Textbox(label="Prompt", value="Pripun kulo saged nyinaoni Basa Jawa kanthi sae?")
31
  output = gr.Textbox(label="Response", scale=2)