Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
| 66 |
|
| 67 |
-
inputs = processor(
|
| 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))
|