Instructions to use Sfrancis333/GenAI_HW1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Sfrancis333/GenAI_HW1 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Sfrancis333/GenAI_HW1") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
File Overview:
- test_images: Contains all test sample images either in /Real or /AI depending on classification
- app.py: Main page
- best_model.keras: Uploaded model from Google Colab notebook
- requirements.txt: All imports
App.py Overview:
Setup:
- Load model in
- Create list of all images filepaths along with the classification
modelGuess Function:
- Preprocess and provide model the image to classify and return boolean result
guess Function:
- Gets model guess
- Updates human and model score based on guesses
- Create result message curated to guesses along with providing accuracy and end of game winner
nextRound Function:
- Choose the next random image to show and add it to the queue
restart Function:
- Reset scores, called on reload
Gradio Block:
- Image displayed
- Real/AI Buttons, result, and Next button set up in a row
- Set up demo load and all button clicks
- Downloads last month
- 13
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support