Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,15 +35,17 @@ if authentication_status:
|
|
35 |
|
36 |
uploaded_file = st.file_uploader("选择..", type=["jpg","png","jpeg"])
|
37 |
if uploaded_file is not None:
|
38 |
-
image = Image.open(uploaded_file).convert('RGB')
|
39 |
-
st.image(image, caption='上传了图片。', use_column_width=True)
|
40 |
-
st.write("")
|
41 |
-
st.write("分类...")
|
42 |
# generator = torch.Generator("cuda").manual_seed(1024)
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
47 |
|
48 |
|
49 |
# label = teachable_machine_classification(image, 'keras_model_apple.h5')
|
|
|
35 |
|
36 |
uploaded_file = st.file_uploader("选择..", type=["jpg","png","jpeg"])
|
37 |
if uploaded_file is not None:
|
38 |
+
# image = Image.open(uploaded_file).convert('RGB')
|
39 |
+
# st.image(image, caption='上传了图片。', use_column_width=True)
|
40 |
+
# st.write("")
|
41 |
+
# st.write("分类...")
|
42 |
# generator = torch.Generator("cuda").manual_seed(1024)
|
43 |
+
|
44 |
+
# generator = torch.Generator().manual_seed(1024)
|
45 |
+
prompt = "a photograph of an astronaut riding a horse"
|
46 |
+
# image_gen = pipe(prompt, generator=generator).images[0]
|
47 |
+
image = pipe(prompt).images[0]
|
48 |
+
st.image(image)
|
49 |
|
50 |
|
51 |
# label = teachable_machine_classification(image, 'keras_model_apple.h5')
|