File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
src/lightning_app/components/serve Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,15 @@ def request_code_sample(url: str) -> str:
70
70
response = requests.post('"""
71
71
+ url
72
72
+ """', json={
73
- "image": img
74
- })"""
73
+ "image": img
74
+ })
75
+ # If you are using basic authentication for your app, you should add your credentials to the request:
76
+ # response = requests.post('"""
77
+ + url
78
+ + """', json={
79
+ # "image": img
80
+ # }, auth=requests.auth.HTTPBasicAuth('your_username', 'your_password'))
81
+ """
75
82
)
76
83
77
84
@staticmethod
@@ -112,8 +119,14 @@ def request_code_sample(url: str) -> str:
112
119
response = requests.post('"""
113
120
+ url
114
121
+ """', json={
115
- "text": "A portrait of a person looking away from the camera"
122
+ "text": "A portrait of a person looking away from the camera"
116
123
})
124
+ # If you are using basic authentication for your app, you should add your credentials to the request:
125
+ # response = requests.post('"""
126
+ + url
127
+ + """', json={
128
+ # "text": "A portrait of a person looking away from the camera"
129
+ # }, auth=requests.auth.HTTPBasicAuth('your_username', 'your_password'))
117
130
"""
118
131
)
119
132
You can’t perform that action at this time.
0 commit comments