willsh1997 commited on
Commit
d708cc3
·
1 Parent(s): 8147f9a

:clown_face: revert sort of

Browse files
Files changed (1) hide show
  1. moral_compass_demo.py +9 -9
moral_compass_demo.py CHANGED
@@ -99,16 +99,16 @@ def gradio_func(input_question, left_lang, right_lang):
99
  """
100
  silly wrapper function for gradio that turns all inputs into a single func. runs both the LHS and RHS of teh 'app' in order to let gradio work correctly.
101
  """
102
- with ThreadPoolExecutor(max_workers=3) as executor:
103
- # Submit all tasks simultaneously
104
- future1 = executor.submit(qwen_generate, input_question)
105
- future2 = executor.submit(llama_QA, input_question, llama2_pipe)
106
- future3 = executor.submit(llama_QA, input_question, llama3_pipe)
107
 
108
- # Collect results
109
- output1 = future1.result()
110
- output2 = future2.result()
111
- output3 = future3.result()
112
 
113
  return output1, output2, output3
114
 
 
99
  """
100
  silly wrapper function for gradio that turns all inputs into a single func. runs both the LHS and RHS of teh 'app' in order to let gradio work correctly.
101
  """
102
+ # with ThreadPoolExecutor(max_workers=3) as executor:
103
+ # # Submit all tasks simultaneously
104
+ # future1 = executor.submit(qwen_generate, input_question)
105
+ # future2 = executor.submit(llama_QA, input_question, llama2_pipe)
106
+ # future3 = executor.submit(llama_QA, input_question, llama3_pipe)
107
 
108
+ # Collect results
109
+ output1 = qwen_generate(input_question) #future1.result()
110
+ output2 = llama_QA(input_question, llama2_pipe) #future2.result()
111
+ output3 = llama_QA(input_question, llama3_pipe) #future3.result()
112
 
113
  return output1, output2, output3
114