Update app.py
Browse files
app.py
CHANGED
|
@@ -1925,12 +1925,17 @@ with gr.Blocks(
|
|
| 1925 |
with gr.Column():
|
| 1926 |
gr.Markdown("### π Card Comparison")
|
| 1927 |
comparison_output = gr.Markdown()
|
| 1928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1929 |
recommend_btn.click(
|
| 1930 |
-
|
| 1931 |
-
|
| 1932 |
-
|
| 1933 |
-
|
| 1934 |
|
| 1935 |
gr.Markdown("### π Example Transactions")
|
| 1936 |
gr.Examples(
|
|
|
|
| 1925 |
with gr.Column():
|
| 1926 |
gr.Markdown("### π Card Comparison")
|
| 1927 |
comparison_output = gr.Markdown()
|
| 1928 |
+
|
| 1929 |
+
def get_recommendation_wrapper(user_id, merchant, category, mcc, amount, use_gemini):
|
| 1930 |
+
global USE_GEMINI
|
| 1931 |
+
USE_GEMINI = use_gemini
|
| 1932 |
+
return get_recommendation_with_agent(user_id, merchant, category, mcc, amount)
|
| 1933 |
+
|
| 1934 |
recommend_btn.click(
|
| 1935 |
+
fn=get_recommendation_wrapper,
|
| 1936 |
+
inputs=[user_id_input, merchant_input, category_input, mcc_input, amount_input, use_gemini_toggle],
|
| 1937 |
+
outputs=[output, chart]
|
| 1938 |
+
)
|
| 1939 |
|
| 1940 |
gr.Markdown("### π Example Transactions")
|
| 1941 |
gr.Examples(
|