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:
7070response = requests.post('"""
7171 + url
7272 + """', 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+ """
7582 )
7683
7784 @staticmethod
@@ -112,8 +119,14 @@ def request_code_sample(url: str) -> str:
112119response = requests.post('"""
113120 + url
114121 + """', 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"
116123})
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'))
117130"""
118131 )
119132
You can’t perform that action at this time.
0 commit comments