Geek7 commited on
Commit
86c8bd9
·
verified ·
1 Parent(s): 7b1766e

Update myapp.py

Browse files
Files changed (1) hide show
  1. myapp.py +4 -0
myapp.py CHANGED
@@ -13,6 +13,10 @@ CORS(myapp) # Enable CORS for all routes
13
  HF_TOKEN = os.environ.get("HF_TOKEN") # Ensure to set your Hugging Face token in the environment
14
  client = InferenceClient(token=HF_TOKEN)
15
 
 
 
 
 
16
  # Function to generate an image from a prompt using the specified model
17
  def generate_image(prompt, seed=1, model="prompthero/openjourney-v4"): # Default model if none provided
18
  try:
 
13
  HF_TOKEN = os.environ.get("HF_TOKEN") # Ensure to set your Hugging Face token in the environment
14
  client = InferenceClient(token=HF_TOKEN)
15
 
16
+ @myapp.route('/')
17
+ def home():
18
+ return "Welcome to the Image Background Remover!"
19
+
20
  # Function to generate an image from a prompt using the specified model
21
  def generate_image(prompt, seed=1, model="prompthero/openjourney-v4"): # Default model if none provided
22
  try: