Spaces:
Sleeping
Sleeping
app.py
CHANGED
@@ -12,7 +12,7 @@ def greet(image):
|
|
12 |
image = (np.clip(image, 0, 1) * 255).astype(np.uint8)
|
13 |
image = Image.fromarray(image, mode='RGB')
|
14 |
with torch.no_grad():
|
15 |
-
outputs = model([image]).generated_text[0]
|
16 |
return outputs
|
17 |
|
18 |
demo = gr.Interface(fn=greet, inputs="image", outputs="text")
|
|
|
12 |
image = (np.clip(image, 0, 1) * 255).astype(np.uint8)
|
13 |
image = Image.fromarray(image, mode='RGB')
|
14 |
with torch.no_grad():
|
15 |
+
outputs = model([image], 300).generated_text[0]
|
16 |
return outputs
|
17 |
|
18 |
demo = gr.Interface(fn=greet, inputs="image", outputs="text")
|