dmedhi commited on
Commit
f334561
1 Parent(s): 43a3800

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -30,8 +30,6 @@ def load_model():
30
  return llm
31
 
32
 
33
- llm = load_model()
34
- print("INFO: Model loaded successfully!")
35
 
36
 
37
  @app.get("/")
@@ -43,12 +41,11 @@ def greet_json():
43
  def query(data: RequestData):
44
  prompt = data.prompt
45
  image = data.image
 
46
 
47
  try:
48
  # decode base64 to image
49
- image = f"""data:image/png;base64,{image}"""
50
- data_uri = image
51
-
52
  messages = [
53
  {"role": "system", "content": "You are an assistant who perfectly describes images."},
54
  {
 
30
  return llm
31
 
32
 
 
 
33
 
34
 
35
  @app.get("/")
 
41
  def query(data: RequestData):
42
  prompt = data.prompt
43
  image = data.image
44
+ llm = load_model()
45
 
46
  try:
47
  # decode base64 to image
48
+ data_uri = f"""data:image/png;base64,{image}"""
 
 
49
  messages = [
50
  {"role": "system", "content": "You are an assistant who perfectly describes images."},
51
  {