as-cle-bert commited on
Commit
31e33fd
·
verified ·
1 Parent(s): 10989ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -63,7 +63,7 @@ def reply(modelA, modelB, prompt):
63
  responseA = run_inference(pipeA, prompt)
64
  pipeB = pipeline("text-generation", model=models_and_tokenizers[modelB][0], tokenizer=models_and_tokenizers[modelB][1], max_new_tokens=512, repetition_penalty=1.5, temperature=0.5, device_map="auto")
65
  responseB = run_inference(pipeB, prompt)
66
- return responseA[0]["generated_text"], responseB[0]["generated_text"]
67
 
68
  modelA_dropdown = gr.Dropdown(models_checkpoints, label="Model A", info="Choose the first model for the battle!")
69
  modelB_dropdown = gr.Dropdown(models_checkpoints, label="Model B", info="Choose the second model for the battle!")
 
63
  responseA = run_inference(pipeA, prompt)
64
  pipeB = pipeline("text-generation", model=models_and_tokenizers[modelB][0], tokenizer=models_and_tokenizers[modelB][1], max_new_tokens=512, repetition_penalty=1.5, temperature=0.5, device_map="auto")
65
  responseB = run_inference(pipeB, prompt)
66
+ return responseA, responseB
67
 
68
  modelA_dropdown = gr.Dropdown(models_checkpoints, label="Model A", info="Choose the first model for the battle!")
69
  modelB_dropdown = gr.Dropdown(models_checkpoints, label="Model B", info="Choose the second model for the battle!")