Spaces:
Sleeping
Sleeping
Add application file
Browse files
app.py
CHANGED
@@ -9,8 +9,7 @@ model = AutoModel.from_pretrained(model_name_or_path, revision="master", trust_r
|
|
9 |
def greet(image):
|
10 |
image = image.convert("RGB")
|
11 |
with torch.no_grad():
|
12 |
-
outputs = model([image]).generated_text
|
13 |
-
|
14 |
return output
|
15 |
|
16 |
demo = gr.Interface(fn=greet, inputs="image", outputs="text")
|
|
|
9 |
def greet(image):
|
10 |
image = image.convert("RGB")
|
11 |
with torch.no_grad():
|
12 |
+
outputs = model([image]).generated_text[0]
|
|
|
13 |
return output
|
14 |
|
15 |
demo = gr.Interface(fn=greet, inputs="image", outputs="text")
|