funnyPhani commited on
Commit
5592cc2
1 Parent(s): df3a1ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import gradio as gr
5
  def medicalImageAnalyzer(image,prompt):
6
  # img = PIL.Image.open(image.name)
7
  model = genai.GenerativeModel('gemini-1.0-pro-vision-latest')
8
- response = model.generate_content(["As a medical analyzer, your task is to thoroughly examine the image and provide a comprehensive analysis. Here's a refined version of your prompt: You are a medical analyst tasked with analyzing the provided image. Your goal is to provide a detailed analysis based on the input image and describe both the dos and don'ts associated with it. Please proceed with your analysis. This prompt conveys a clear and concise instruction for the medical analyzer, outlining their role and the objective of the analysis. It prompts them to provide both detailed insights into the image and practical recommendations based on their findings.", prompt,image], stream=True)
9
  response.resolve()
10
  return response.text
11
 
@@ -20,5 +20,5 @@ iface = gr.Interface(
20
  )
21
 
22
  # Launch the interface
23
- iface.launch(debug=False,inline = False)
24
 
 
5
  def medicalImageAnalyzer(image,prompt):
6
  # img = PIL.Image.open(image.name)
7
  model = genai.GenerativeModel('gemini-1.0-pro-vision-latest')
8
+ response = model.generate_content(["You are medical analyzer, Try to analyse the image and generate a short finding of the image", prompt,image], stream=True)
9
  response.resolve()
10
  return response.text
11
 
 
20
  )
21
 
22
  # Launch the interface
23
+ iface.launch(debug=False,inline = False,share = True)
24