You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,8 @@ Let's go over an example: creating an image generation UI around [DALL·E](https
80
80
81
81
Here is the complete code to create this. This is all done in one Python file!
82
82
83
+
84
+
83
85
```python
84
86
import reflex as rx
85
87
import openai
@@ -108,6 +110,7 @@ class State(rx.State):
108
110
self.image_url = response.data[0].url
109
111
self.processing, self.complete =False, True
110
112
113
+
111
114
defindex():
112
115
return rx.center(
113
116
rx.vstack(
@@ -132,14 +135,22 @@ def index():
132
135
height="100vh",
133
136
)
134
137
135
-
136
138
# Add state and page to the app.
137
139
app = rx.App()
138
140
app.add_page(index, title="Reflex:DALL-E")
139
141
```
140
142
143
+
144
+
145
+
146
+
141
147
## Let's break this down.
142
148
149
+
<divalign="center">
150
+
<imgsrc="docs/images/dalle_colored_code_example.png"alt="Explaining the differences between backend and frontend parts of the DALL-E app."width="900" />
0 commit comments