Spaces:
Sleeping
Sleeping
File size: 1,215 Bytes
e44d530 f39d1fb 6f8dc16 f39d1fb 6f8dc16 f39d1fb e44d530 6f8dc16 e44d530 6f8dc16 f39d1fb e44d530 6f8dc16 f39d1fb 6f8dc16 e44d530 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import gradio as gr
from inference import get_evo_response, get_gpt_response
def advisor_interface(prompt, option1, option2):
evo_result = get_evo_response(prompt, option1, option2)
gpt_result = get_gpt_response(prompt, option1, option2)
return evo_result, gpt_result
with gr.Blocks() as demo:
gr.Markdown("## π§ EvoRAG β Retrieval-Augmented Adaptive AI for Reasoning")
gr.Markdown("Ask a commonsense or financial reasoning question with two options. Evo and GPT-3.5 will both suggest the better one.")
with gr.Row():
prompt = gr.Textbox(label="π Your Question", placeholder="e.g. Should we reduce exposure to Tech Fund A this quarter?")
with gr.Row():
option1 = gr.Textbox(label="πΉ Option 1", placeholder="Yes, reduce exposure this quarter.")
option2 = gr.Textbox(label="πΈ Option 2", placeholder="No, maintain current allocation.")
with gr.Row():
evo_output = gr.Textbox(label="π¬ EvoRAG Suggestion")
gpt_output = gr.Textbox(label="π€ GPT-3.5 Suggestion")
run_btn = gr.Button("Run Advisors")
run_btn.click(fn=advisor_interface, inputs=[prompt, option1, option2], outputs=[evo_output, gpt_output])
demo.launch()
|