Spaces:
Sleeping
Sleeping
fenglinliu
commited on
Commit
•
6c83c5b
1
Parent(s):
db3243e
Update app.py
Browse files
app.py
CHANGED
@@ -106,7 +106,8 @@ def generate_report(image):
|
|
106 |
with torch.no_grad():
|
107 |
output = model([image], mode='sample')
|
108 |
reports = tokenizer.decode_batch(output.cpu().numpy())
|
109 |
-
|
|
|
110 |
|
111 |
# Define Gradio interface
|
112 |
iface = gr.Interface(
|
|
|
106 |
with torch.no_grad():
|
107 |
output = model([image], mode='sample')
|
108 |
reports = tokenizer.decode_batch(output.cpu().numpy())
|
109 |
+
outputs = reports[0].split('.', 1)[-1].strip()
|
110 |
+
return outputs
|
111 |
|
112 |
# Define Gradio interface
|
113 |
iface = gr.Interface(
|