Subbu1304 commited on
Commit
cf50ce0
·
verified ·
1 Parent(s): 54e69bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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.ButtonGroup(choices=["Vegetarian", "Non-Vegetarian"], label="Select Category")
133
- ingredient_btns = gr.ButtonGroup(choices=VEG_INGREDIENTS + NONVEG_TYPES, label="Select Ingredient")
134
- nutrition_btns = gr.ButtonGroup(choices=NUTRITION_OPTIONS, label="Select Nutrition")
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")