fffiloni commited on
Commit
5bddbaf
1 Parent(s): 4069b1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -70,7 +70,7 @@ def infer(image_in):
70
 
71
  print(f"SUGGESTED LLM: {cleaned_text}")
72
 
73
- return cleaned_text.lstrip("\n")
74
 
75
  title = f"LLM Agent from a Picture",
76
  description = f"Get a LLM system prompt from a picture so you can use it in <a href='https://huggingface.co/spaces/abidlabs/GPT-Baker'>GPT-Baker</a>."
@@ -99,8 +99,12 @@ with gr.Blocks(css=css) as demo:
99
  )
100
  submit_btn = gr.Button("Make LLM system from my pic !")
101
  with gr.Column():
 
 
 
 
102
  result = gr.Textbox(
103
- label ="Suggested System",
104
  lines = 6,
105
  max_lines = 30,
106
  elem_id = "suggested-system-prompt"
@@ -116,7 +120,7 @@ with gr.Blocks(css=css) as demo:
116
  ],
117
  fn = infer,
118
  inputs = [image_in],
119
- outputs = [result],
120
  cache_examples = True
121
  )
122
 
@@ -126,6 +130,7 @@ with gr.Blocks(css=css) as demo:
126
  image_in
127
  ],
128
  outputs =[
 
129
  result
130
  ]
131
  )
 
70
 
71
  print(f"SUGGESTED LLM: {cleaned_text}")
72
 
73
+ return user_prompt, cleaned_text.lstrip("\n")
74
 
75
  title = f"LLM Agent from a Picture",
76
  description = f"Get a LLM system prompt from a picture so you can use it in <a href='https://huggingface.co/spaces/abidlabs/GPT-Baker'>GPT-Baker</a>."
 
99
  )
100
  submit_btn = gr.Button("Make LLM system from my pic !")
101
  with gr.Column():
102
+ caption = gr.Textbox(
103
+ label = "Image caption (fuyu)",
104
+ elem_id = "image-caption"
105
+ )
106
  result = gr.Textbox(
107
+ label = "Suggested System",
108
  lines = 6,
109
  max_lines = 30,
110
  elem_id = "suggested-system-prompt"
 
120
  ],
121
  fn = infer,
122
  inputs = [image_in],
123
+ outputs = [caption, result],
124
  cache_examples = True
125
  )
126
 
 
130
  image_in
131
  ],
132
  outputs =[
133
+ caption,
134
  result
135
  ]
136
  )