Omarlittel commited on
Commit
fc0755f
1 Parent(s): e7a53c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,10 +11,10 @@ def generate_response(input_text):
11
  input_text = system_prompt + '\n' + input_text
12
 
13
  inputs = tokenizer(input_text, return_tensors="pt")
14
- outputs = model.generate(**inputs)
15
  response = tokenizer.decode(outputs[0], skip_special_tokens=True)
16
  return response
17
 
18
  # Set up Gradio interface
19
  iface = gr.Interface(fn=generate_response, inputs="text", outputs="text")
20
- iface.launch()
 
11
  input_text = system_prompt + '\n' + input_text
12
 
13
  inputs = tokenizer(input_text, return_tensors="pt")
14
+ outputs = model.generate(**inputs, max_length=150)
15
  response = tokenizer.decode(outputs[0], skip_special_tokens=True)
16
  return response
17
 
18
  # Set up Gradio interface
19
  iface = gr.Interface(fn=generate_response, inputs="text", outputs="text")
20
+ iface.launch()