Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,9 +41,9 @@ with gr.Blocks() as demo:
|
|
41 |
with gr.Row():
|
42 |
image = gr.Image(label="Upload Chest X-ray", type="pil")
|
43 |
|
44 |
-
gr.HTML("<p style='text-align: center;'> Please select the Number of Max Tokens and Temperature setting, if you are testing CLIP GPT2 and VIT GPT2 Models</p>")
|
45 |
|
46 |
with gr.Row():
|
|
|
47 |
with gr.Column():
|
48 |
max_tokens = gr.Dropdown(list(range(50, 101)), label="Max Tokens", value=75)
|
49 |
temperature = gr.Slider(0.5, 0.9, step=0.1, label="Temperature", value=0.7)
|
@@ -52,9 +52,6 @@ with gr.Blocks() as demo:
|
|
52 |
|
53 |
generate_button = gr.Button("Generate Caption")
|
54 |
caption = gr.Textbox(label="Generated Caption")
|
55 |
-
|
56 |
-
|
57 |
-
gr.HTML("<p style='text-align: center;'> Please select the Number of Max Tokens and Temperature setting, if you are testing CLIP GPT2 and VIT GPT2 Models</p>")
|
58 |
|
59 |
|
60 |
def predict(img, model_name, max_tokens, temperature):
|
|
|
41 |
with gr.Row():
|
42 |
image = gr.Image(label="Upload Chest X-ray", type="pil")
|
43 |
|
|
|
44 |
|
45 |
with gr.Row():
|
46 |
+
gr.HTML("<p style='text-align: center;'> Please select the Number of Max Tokens and Temperature setting, if you are testing CLIP GPT2 and VIT GPT2 Models</p>")
|
47 |
with gr.Column():
|
48 |
max_tokens = gr.Dropdown(list(range(50, 101)), label="Max Tokens", value=75)
|
49 |
temperature = gr.Slider(0.5, 0.9, step=0.1, label="Temperature", value=0.7)
|
|
|
52 |
|
53 |
generate_button = gr.Button("Generate Caption")
|
54 |
caption = gr.Textbox(label="Generated Caption")
|
|
|
|
|
|
|
55 |
|
56 |
|
57 |
def predict(img, model_name, max_tokens, temperature):
|