dgnk007 commited on
Commit
5a86693
1 Parent(s): 85329fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -32,11 +32,11 @@ 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
 
 
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[0]['generated_text'],
36
+ "r2": output_text2[0]['generated_text'],
37
  }
38
  id=store_in_mongodb("arena_collection", data_to_store)
39
+ return output_text1[0]['generated_text'], output_text2[0]['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