chengzeyi commited on
Commit
4bead13
·
verified ·
1 Parent(s): ccb88d2

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -0
app.py CHANGED
@@ -268,7 +268,7 @@ def create_error_image(backend, error_message):
268
  img_bytes = buffer.getvalue()
269
 
270
  # Convert to base64 and return as data URI
271
- return f"data:image/png;base64,{base64.b64encode(img_bytes).decode('utf-8')}"
272
  except Exception as e:
273
  print(f"Failed to create error image: {e}")
274
  # Return a simple error message as fallback
@@ -333,7 +333,7 @@ async def poll_once(manager, backend, request_id):
333
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
334
  session_id = gr.State(None) # Add this to store session ID
335
 
336
- gr.Markdown("# 🌊 WaveSpeed AI Image Generator")
337
 
338
  # Add the introduction with link to WaveSpeedAI
339
  gr.Markdown(
 
268
  img_bytes = buffer.getvalue()
269
 
270
  # Convert to base64 and return as data URI
271
+ return f"data:image/jpeg;base64,{base64.b64encode(img_bytes).decode('utf-8')}"
272
  except Exception as e:
273
  print(f"Failed to create error image: {e}")
274
  # Return a simple error message as fallback
 
333
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
334
  session_id = gr.State(None) # Add this to store session ID
335
 
336
+ gr.Markdown("# 🌊 HiDream Arena powered by WaveSpeed AI Image Generator")
337
 
338
  # Add the introduction with link to WaveSpeedAI
339
  gr.Markdown(
requirements.txt CHANGED
@@ -2,3 +2,4 @@ gradio
2
  aiohttp
3
  plotly
4
  python-dotenv
 
 
2
  aiohttp
3
  plotly
4
  python-dotenv
5
+ pydantic==2.8.2