This file contains hidden or 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
class createLaundryItem(object): | |
def __init__(self): | |
self.items = ["soak", "wash", "rinse", "spin", "dry", "done"] | |
def nextCycle(self): | |
if self.items[0] == "done": | |
return self.items[0] | |
else: | |
item = self.items.pop(0) | |
return item |
This file contains hidden or 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
GOOGLE_API_KEY="PASTE YOUR GEMINI API KEY HERE" |
This file contains hidden or 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
# main.py | |
import functions_framework | |
from flask import jsonify # Standard way to create JSON responses in Flask | |
import os | |
import traceback # For formatting tracebacks | |
# SDK for Google AI Gemini API (e.g., from AI Studio) | |
from google import generativeai as genai | |
# from google.generativeai import types # Not strictly needed for simple text prompts |