File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def analyze_image(image_url, prompt):
9797
9898        # Extract and return the model's response 
9999        result  =  response .json ()
100-         return  result ["choices" ][0 ]["message" ]["content" ]
100+         return  image ,  result ["choices" ][0 ]["message" ]["content" ]
101101
102102    except  Exception  as  e :
103103        return  f"An error occurred: { str (e )}  
@@ -114,7 +114,7 @@ def analyze_image(image_url, prompt):
114114        gr .Textbox (label = "Image URL" ),
115115        gr .Textbox (label = "Prompt/Question" , elem_id = "prompt" , scale = 2 ),
116116    ],
117-     outputs = gr .Textbox (label = "Results" ),
117+     outputs = [ gr .Image ( label = "Image" ),  gr . Textbox (label = "Results" )] ,
118118    title = settings .page_title ,
119119    description = settings .page_description ,
120120    examples = [[ex .image_url , ex .prompt ] for  ex  in  settings .examples ],
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments