-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from kat9897/dev
BIG UPDATE
- Loading branch information
Showing
23 changed files
with
225 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# UofTHacks | ||
# SnapToSavor | ||
Our ingredients to recipe app for UofTHacks 11! | ||
|
||
## Instructions | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-740 Bytes
app/extra/src/confirm_ing/__pycache__/confirm_ing.cpython-311.pyc
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,35 @@ | ||
from taipy.gui import navigate | ||
import os | ||
from .landing_page import * | ||
from food_api import * | ||
|
||
# Bindings | ||
here = os.path.dirname(os.path.abspath(__file__)) | ||
image = os.path.join(here, "./img/image-missing.svg") # default image without any user input | ||
num_ingred = 0 | ||
# here = os.path.dirname(os.path.abspath(__file__)) | ||
# image = os.path.join(here, "./img/image-missing.svg") # default image without any user input | ||
selected_files = None | ||
ingredients = [] | ||
num_ingred = 1 | ||
|
||
confirm_ingredients_page=""" | ||
<|layout|columns=2 2| | ||
<|layout|columns=2 3| | ||
<|card card-bg| | ||
<|{image}|image|label="Uploaded Fridge Image"|> | ||
<center> | ||
<|{selected_files}|image|> | ||
</center> | ||
|> | ||
<|card card-bg| | ||
<|Confirm {num_ingred} ingredient(s):|>\n | ||
<|Confirmed {num_ingred} ingredient(s):|>\n | ||
<|{ingredients[0]}|> | ||
|> | ||
<|Confirm|button|on_action=confirmed_ingred|> | ||
<|Confirm|button|class_name=success|on_action=confirmed_ingred|> | ||
<|Delete|button|class_name=error|on_action=delete_ingred|> | ||
|> | ||
""" | ||
|
||
def confirmed_ingred(state): | ||
print(image) | ||
# navigate(state, "recipes") | ||
def update_num_ingred(state): | ||
num_ingred = num_ingred + 1 | ||
|
||
def confirmed_ingred(state): | ||
navigate(state, "recipes") | ||
|
||
def delete_ingred(state): | ||
navigate(state, to="ingredients") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
found_recipes_page = """ | ||
### Hello. You found recipes | ||
<|layout|columns=1 3| | ||
<|card card-bg| | ||
## Ingredients | ||
<|card card-bg| {.red} | ||
BANANA\n | ||
BANANA BABY\n | ||
BANANA | ||
|> | ||
|> | ||
<|card card-bg| | ||
## Recipes | ||
<|layout|columns=1 1 1| | ||
<|card card-bg| | ||
<|app/pages/img/banana.jpg|image|> | ||
|> | ||
<|card card-bg| | ||
<|app/pages/img/banana-baby-producto-caribbean-exotics.png|image|> | ||
|> | ||
<|card card-bg| | ||
<|app/pages/img/banana.jpg|image|> | ||
|> | ||
|> | ||
|> | ||
|> | ||
""" | ||
|
||
|
||
# recipe = call database | ||
# recipes = len[recipe] | ||
|
||
# def nonempty(): | ||
# return recipes != 0 |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
from taipy.gui import navigate | ||
from food_api import get_ingredients | ||
|
||
# Bindings | ||
selected_files = None | ||
|
||
value = "Search for recipe..." | ||
|
||
landing_page=""" | ||
<|{selected_files}|file_selector|label=Upload File|on_action=uploaded_files|extensions=.jpg,.jpeg,.png|drop_message=Drop Message|> | ||
#Search for recipe: | ||
## Search for recipe | ||
<|{value}|input|><|find|button|on_action=uploaded_files|> | ||
""" | ||
|
||
def uploaded_files(state): | ||
state.ingredients = get_ingredients(state.selected_files) | ||
state.num_ingred = len(state.ingredients) | ||
navigate(state, to="confirm") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
root_page = """ | ||
<|navbar|> | ||
# Ingredient to Recipe App | ||
# SnaptoSavor | ||
""" |