ka1kuk commited on
Commit
bcf8e55
1 Parent(s): 5c7905f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -0
main.py CHANGED
@@ -2,6 +2,7 @@ from fastapi import FastAPI
2
  from fastapi.middleware.cors import CORSMiddleware
3
  import asyncio
4
  from Linlada import Chatbot, ConversationStyle
 
5
 
6
  app = FastAPI()
7
 
@@ -25,6 +26,11 @@ def read_root():
25
  @app.get("/test/{hello}")
26
  def hi(hello: str):
27
  return {"text": hello}
 
 
 
 
 
28
 
29
  @app.get('/linlada/{prompt}')
30
  def generate_image_route(prompt: str):
 
2
  from fastapi.middleware.cors import CORSMiddleware
3
  import asyncio
4
  from Linlada import Chatbot, ConversationStyle
5
+ from photo import Gimager
6
 
7
  app = FastAPI()
8
 
 
26
  @app.get("/test/{hello}")
27
  def hi(hello: str):
28
  return {"text": hello}
29
+
30
+ @app.get("/image/{image}")
31
+ def img(image: str):
32
+ img = Gimager(image)
33
+ return img
34
 
35
  @app.get('/linlada/{prompt}')
36
  def generate_image_route(prompt: str):