SpyC0der77 commited on
Commit
a180f58
·
verified ·
1 Parent(s): da28892

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -1,14 +1,12 @@
1
  import gradio as gr
2
- import numpy as np
3
  from huggingface_hub import InferenceClient
 
4
  client = InferenceClient("EvanZhouDev/open-genmoji", token=os.getenv("HUGGINGFACE_API_TOKEN"))
5
 
6
  # output is a PIL.Image object
7
 
8
  # Define the process function that takes a text prompt and returns an image
9
  def process(prompt):
10
- # Placeholder for the actual image generation logic
11
- # For demonstration, we generate a random image
12
  image = client.text_to_image(prompt)
13
  return image
14
 
 
1
  import gradio as gr
 
2
  from huggingface_hub import InferenceClient
3
+ import os
4
  client = InferenceClient("EvanZhouDev/open-genmoji", token=os.getenv("HUGGINGFACE_API_TOKEN"))
5
 
6
  # output is a PIL.Image object
7
 
8
  # Define the process function that takes a text prompt and returns an image
9
  def process(prompt):
 
 
10
  image = client.text_to_image(prompt)
11
  return image
12