Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
# Corrected Food Database with consistent food item names
|
| 4 |
FOOD_DATABASE = {
|
|
@@ -129,9 +133,9 @@ def process_message(message, history):
|
|
| 129 |
# Gradio interface for the chatbot
|
| 130 |
def create_gradio_interface():
|
| 131 |
with gr.Blocks() as demo:
|
| 132 |
-
category_btns = gr.
|
| 133 |
-
ingredient_btns = gr.
|
| 134 |
-
nutrition_btns = gr.
|
| 135 |
chatbot = gr.Chatbot([])
|
| 136 |
msg = gr.Textbox(show_label=False, placeholder="Enter text and press enter")
|
| 137 |
clear = gr.Button("Clear")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from flask import Flask, request, jsonify
|
| 3 |
+
|
| 4 |
+
# Flask app setup
|
| 5 |
+
app = Flask(__name__)
|
| 6 |
|
| 7 |
# Corrected Food Database with consistent food item names
|
| 8 |
FOOD_DATABASE = {
|
|
|
|
| 133 |
# Gradio interface for the chatbot
|
| 134 |
def create_gradio_interface():
|
| 135 |
with gr.Blocks() as demo:
|
| 136 |
+
category_btns = gr.Radio(choices=["Vegetarian", "Non-Vegetarian"], label="Select Category")
|
| 137 |
+
ingredient_btns = gr.Radio(choices=VEG_INGREDIENTS + NONVEG_TYPES, label="Select Ingredient")
|
| 138 |
+
nutrition_btns = gr.Radio(choices=NUTRITION_OPTIONS, label="Select Nutrition")
|
| 139 |
chatbot = gr.Chatbot([])
|
| 140 |
msg = gr.Textbox(show_label=False, placeholder="Enter text and press enter")
|
| 141 |
clear = gr.Button("Clear")
|