dgnk007 commited on
Commit
85329fe
1 Parent(s): 3b634cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,14 +29,14 @@ def general_function(input_text):
29
  return output_text
30
 
31
  def arena_function(input_text):
32
- output_text = generate_text(input_text,2)
33
  data_to_store = {
34
  "input": input_text,
35
- "r1": output_text[0]['generated_text'],
36
- "r2": output_text[1]['generated_text'],
37
  }
38
  id=store_in_mongodb("arena_collection", data_to_store)
39
- return output_text[0]['generated_text'], output_text[1]['generated_text'], id.inserted_id,btn_enable,btn_enable,btn_enable,btn_enable
40
 
41
  general_interface = gr.Interface(fn=general_function, inputs=gr.Textbox(label="Enter your text here:", min_width=600), outputs="text")
42
 
 
29
  return output_text
30
 
31
  def arena_function(input_text):
32
+ output_text1,output_text2 = generate_text(input_text,1),generate_text(input_text,1)
33
  data_to_store = {
34
  "input": input_text,
35
+ "r1": output_text1,
36
+ "r2": output_text2,
37
  }
38
  id=store_in_mongodb("arena_collection", data_to_store)
39
+ return output_text1, output_text2, id.inserted_id,btn_enable,btn_enable,btn_enable,btn_enable
40
 
41
  general_interface = gr.Interface(fn=general_function, inputs=gr.Textbox(label="Enter your text here:", min_width=600), outputs="text")
42