Skip to content
Discussion options

You must be logged in to vote

I can't view the image you sent. But I looked into your suggestion of using query parameters, it now works. Thanks!

Here's the working implementation as reference for anyone who might run into this problem in the future.

from fastapi import FastAPI
import tensorflow as tf
import numpy as np

app = FastAPI()
model_dir = "food-vision-model.h5"
model = tf.keras.models.load_model(model_dir)

class_predictions = [
    'apple_pie',
    'baby_back_ribs',
    'baklava',
    'beef_carpaccio',
    'beef_tartare',
    'beet_salad',
    'beignets',
    'bibimbap',
    'bread_pudding',
    'breakfast_burrito',
    'bruschetta',
    'caesar_salad',
    'cannoli',
    'caprese_salad',
    'carrot_cake',…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem question-migrate
2 participants
Converted from issue

This discussion was converted from issue #4577 on February 27, 2023 22:00.