haoyu commited on
Commit
3321613
·
1 Parent(s): eb22b86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -62,9 +62,10 @@ if authentication_status:
62
 
63
  urll = st.text_input("image url", value="")
64
  if st.button("send"):
65
- raw_image = Image.open(requests.get(urll, stream=True).raw).convert('RGB')
 
66
 
67
- inputs = processor(raw_image, return_tensors="pt")
68
 
69
  out = model.generate(**inputs)
70
  st.text(processor.decode(out[0], skip_special_tokens=True))
 
62
 
63
  urll = st.text_input("image url", value="")
64
  if st.button("send"):
65
+ raw_image1 = Image.open(requests.get(urll, stream=True).raw).convert('RGB')
66
+ st.image(raw_image1, caption='image', use_column_width=True)
67
 
68
+ inputs = processor(raw_image1, return_tensors="pt")
69
 
70
  out = model.generate(**inputs)
71
  st.text(processor.decode(out[0], skip_special_tokens=True))