fffiloni commited on
Commit
eb67b06
·
verified ·
1 Parent(s): cf39162

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -59,7 +59,7 @@ def get_caption_from_MD(image_in):
59
  client = Client("https://vikhyatk-moondream1.hf.space/")
60
  result = client.predict(
61
  image_in, # filepath in 'image' Image component
62
- "Describe precisely the image.", # str in 'Question' Textbox component
63
  api_name="/answer_question"
64
  )
65
  print(result)
@@ -99,7 +99,7 @@ instruction = f"""
99
 
100
  def infer(image_in):
101
  gr.Info("Getting image caption with Kosmos2...")
102
- user_prompt = get_caption(image_in)
103
 
104
  prompt = f"{instruction.strip()}\n{user_prompt}</s>"
105
  #print(f"PROMPT: {prompt}")
 
59
  client = Client("https://vikhyatk-moondream1.hf.space/")
60
  result = client.predict(
61
  image_in, # filepath in 'image' Image component
62
+ "Describe character like if it was fictional", # str in 'Question' Textbox component
63
  api_name="/answer_question"
64
  )
65
  print(result)
 
99
 
100
  def infer(image_in):
101
  gr.Info("Getting image caption with Kosmos2...")
102
+ user_prompt = get_caption_from_MD(image_in)
103
 
104
  prompt = f"{instruction.strip()}\n{user_prompt}</s>"
105
  #print(f"PROMPT: {prompt}")