leilaaaaa commited on
Commit
5d29f36
·
verified ·
1 Parent(s): b63f8db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -84,4 +84,22 @@ try:
84
  ],
85
  outputs=[
86
  gr.Textbox(label="Response", placeholder="Model response will appear here..."),
87
- gr.Image(label="Gene
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  ],
85
  outputs=[
86
  gr.Textbox(label="Response", placeholder="Model response will appear here..."),
87
+ gr.Image(label="Generated Image", type="pil")
88
+ ],
89
+ title="LLAVA Model - Medical Image and Question",
90
+ description="Upload a medical image and ask a specific question about the image for a medical description.",
91
+ additional_inputs=[
92
+ gr.Textbox(label="System message", value="You are a friendly Chatbot."),
93
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
94
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
95
+ gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
96
+ ]
97
+ )
98
+
99
+ # Launch the Gradio interface
100
+ if __name__ == "__main__":
101
+ print("Launching Gradio interface...")
102
+ demo.launch()
103
+
104
+ except Exception as e:
105
+ print(f"Error during Gradio setup: {str(e)}")