MH0386 commited on
Commit
c6c2df7
β€’
1 Parent(s): f46599d

Upload folder using huggingface_hub

Browse files
.deepsource.toml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ version = 1
2
+
3
+ [[analyzers]]
4
+ name = "python"
5
+
6
+ [analyzers.meta]
7
+ runtime_version = "3.x.x"
.github/workflows/main.yml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Push to huggingface
2
+ on: [push]
3
+ jobs:
4
+ Sync:
5
+ runs-on: ubuntu-latest
6
+ env:
7
+ HF_HUB_ENABLE_HF_TRANSFER: 1
8
+ steps:
9
+ - name: Checkout
10
+ uses: actions/checkout@v4
11
+ - name: Login to HuggingFace Hub
12
+ uses: osbm/[email protected]
13
+ with:
14
+ username: ${{ secrets.HF_USERNAME }}
15
+ key: ${{ secrets.HF_KEY }}
16
+ add_to_git_credentials: true
17
+ - name: Enable hf_transfer
18
+ run: pip install huggingface_hub[hf_transfer]
19
+ - name: Check if logged in
20
+ run: huggingface-cli whoami
21
+ - name: Upload
22
+ run: huggingface-cli upload AlphaSphereDotAI/chatacher . . --repo-type space
.streamlit/config.toml CHANGED
@@ -1,291 +1,291 @@
1
- # Below are all the sections and options you can have in ~/.streamlit/config.toml.
2
-
3
-
4
- [global]
5
-
6
- # By default, Streamlit displays a warning when a user sets both a widget
7
- # default value in the function defining the widget and a widget value via
8
- # the widget's key in `st.session_state`.
9
-
10
- # If you'd like to turn off this warning, set this to True.
11
-
12
- # Default: false
13
- # disableWidgetStateDuplicationWarning = false
14
-
15
- # If True, will show a warning when you run a Streamlit-enabled script
16
- # via "python my_script.py".
17
-
18
- # Default: true
19
- # showWarningOnDirectExecution = true
20
-
21
-
22
- [logger]
23
-
24
- # Level of logging: 'error', 'warning', 'info', or 'debug'.
25
-
26
- # Default: 'info'
27
- # level = "info"
28
-
29
- # String format for logging messages. If logger.datetimeFormat is set,
30
- # logger messages will default to `%(asctime)s.%(msecs)03d %(message)s`. See
31
- # [Python's documentation](https://docs.python.org/2.6/library/logging.html#formatter-objects)
32
- # for available attributes.
33
-
34
- # Default: "%(asctime)s %(message)s"
35
- # messageFormat = "%(asctime)s %(message)s"
36
-
37
-
38
- [client]
39
-
40
- # Controls whether uncaught app exceptions and deprecation warnings
41
- # are displayed in the browser. By default, this is set to True and
42
- # Streamlit displays app exceptions and associated tracebacks, and
43
- # deprecation warnings, in the browser.
44
-
45
- # If set to False, deprecation warnings and full exception messages
46
- # will print to the console only. Exceptions will still display in the
47
- # browser with a generic error message. For now, the exception type and
48
- # traceback show in the browser also, but they will be removed in the
49
- # future.
50
-
51
- # Default: true
52
- # showErrorDetails = true
53
-
54
- # Change the visibility of items in the toolbar, options menu,
55
- # and settings dialog (top right of the app).
56
-
57
- # Allowed values:
58
- # * "auto" : Show the developer options if the app is accessed through
59
- # localhost or through Streamlit Community Cloud as a developer.
60
- # Hide them otherwise.
61
- # * "developer" : Show the developer options.
62
- # * "viewer" : Hide the developer options.
63
- # * "minimal" : Show only options set externally (e.g. through
64
- # Streamlit Community Cloud) or through st.set_page_config.
65
- # If there are no options left, hide the menu.
66
-
67
- # Default: "auto"
68
- # toolbarMode = "auto"
69
-
70
- # Controls whether the default sidebar page navigation in a multi-page app is displayed.
71
-
72
- # Default: true
73
- # showSidebarNavigation = true
74
-
75
-
76
- [runner]
77
-
78
- # Allows you to type a variable or string by itself in a single line of
79
- # Python code to write it to the app.
80
-
81
- # Default: true
82
- # magicEnabled = true
83
-
84
- # Handle script rerun requests immediately, rather than waiting for script
85
- # execution to reach a yield point. This makes Streamlit much more
86
- # responsive to user interaction, but it can lead to race conditions in
87
- # apps that mutate session_state data outside of explicit session_state
88
- # assignment statements.
89
-
90
- # Default: true
91
- # fastReruns = true
92
-
93
- # Raise an exception after adding unserializable data to Session State.
94
- # Some execution environments may require serializing all data in Session
95
- # State, so it may be useful to detect incompatibility during development,
96
- # or when the execution environment will stop supporting it in the future.
97
-
98
- # Default: false
99
- # enforceSerializableSessionState = false
100
-
101
- # Adjust how certain 'options' widgets like radio, selectbox, and
102
- # multiselect coerce Enum members when the Enum class gets
103
- # re-defined during a script re-run.
104
-
105
- # Allowed values:
106
- # * "off": Disables Enum coercion.
107
- # * "nameOnly": Enum classes can be coerced if their member names match.
108
- # * "nameAndValue": Enum classes can be coerced if their member names AND
109
- # member values match.
110
-
111
- # Default: "nameOnly"
112
- # enumCoercion = "nameOnly"
113
-
114
-
115
- [server]
116
-
117
- # List of folders that should not be watched for changes. This
118
- # impacts both "Run on Save" and @st.cache.
119
-
120
- # Relative paths will be taken as relative to the current working directory.
121
-
122
- # Example: ['/home/user1/env', 'relative/path/to/folder']
123
-
124
- # Default: []
125
- # folderWatchBlacklist = []
126
-
127
- # Change the type of file watcher used by Streamlit, or turn it off
128
- # completely.
129
-
130
- # Allowed values:
131
- # * "auto" : Streamlit will attempt to use the watchdog module, and
132
- # falls back to polling if watchdog is not available.
133
- # * "watchdog" : Force Streamlit to use the watchdog module.
134
- # * "poll" : Force Streamlit to always use polling.
135
- # * "none" : Streamlit will not watch files.
136
-
137
- # Default: "auto"
138
- # fileWatcherType = "auto"
139
-
140
- # Symmetric key used to produce signed cookies. If deploying on multiple replicas, this should
141
- # be set to the same value across all replicas to ensure they all share the same secret.
142
-
143
- # Default: randomly generated secret key.
144
- # cookieSecret = "fbab6909be70b3321d1326e478a68ab9208cd0b53e6140383b75e6422554941f"
145
-
146
- # If false, will attempt to open a browser window on start.
147
-
148
- # Default: false unless (1) we are on a Linux box where DISPLAY is unset, or
149
- # (2) we are running in the Streamlit Atom plugin.
150
- headless = false
151
-
152
- # Automatically rerun script when the file is modified on disk.
153
-
154
- # Default: false
155
- runOnSave = true
156
-
157
- # The address where the server will listen for client and browser
158
- # connections. Use this if you want to bind the server to a specific address.
159
- # If set, the server will only be accessible from this address, and not from
160
- # any aliases (like localhost).
161
-
162
- # Default: (unset)
163
- # address =
164
-
165
- # The port where the server will listen for browser connections.
166
-
167
- # Don't use port 3000 which is reserved for internal development.
168
-
169
- # Default: 8501
170
- # port = 8501
171
-
172
- # The base path for the URL where Streamlit should be served from.
173
-
174
- # Default: ""
175
- # baseUrlPath = ""
176
-
177
- # Enables support for Cross-Origin Resource Sharing (CORS) protection, for added security.
178
-
179
- # Due to conflicts between CORS and XSRF, if `server.enableXsrfProtection` is on and
180
- # `server.enableCORS` is off at the same time, we will prioritize `server.enableXsrfProtection`.
181
-
182
- # Default: true
183
- # enableCORS = true
184
-
185
- # Enables support for Cross-Site Request Forgery (XSRF) protection, for added security.
186
-
187
- # Due to conflicts between CORS and XSRF, if `server.enableXsrfProtection` is on and
188
- # `server.enableCORS` is off at the same time, we will prioritize `server.enableXsrfProtection`.
189
-
190
- # Default: true
191
- # enableXsrfProtection = true
192
-
193
- # Max size, in megabytes, for files uploaded with the file_uploader.
194
-
195
- # Default: 200
196
- # maxUploadSize = 200
197
-
198
- # Max size, in megabytes, of messages that can be sent via the WebSocket connection.
199
-
200
- # Default: 200
201
- # maxMessageSize = 200
202
-
203
- # Enables support for websocket compression.
204
-
205
- # Default: false
206
- # enableWebsocketCompression = false
207
-
208
- # Enable serving files from a `static` directory in the running app's directory.
209
-
210
- # Default: false
211
- # enableStaticServing = false
212
-
213
- # Server certificate file for connecting via HTTPS.
214
- # Must be set at the same time as "server.sslKeyFile".
215
-
216
- # ['DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.']
217
- # sslCertFile =
218
-
219
- # Cryptographic key file for connecting via HTTPS.
220
- # Must be set at the same time as "server.sslCertFile".
221
-
222
- # ['DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.']
223
- # sslKeyFile =
224
-
225
-
226
- [browser]
227
-
228
- # Internet address where users should point their browsers in order to
229
- # connect to the app. Can be IP address or DNS name and path.
230
-
231
- # This is used to:
232
- # - Set the correct URL for CORS and XSRF protection purposes.
233
- # - Show the URL on the terminal
234
- # - Open the browser
235
-
236
- # Default: "localhost"
237
- # serverAddress = "localhost"
238
-
239
- # Whether to send usage statistics to Streamlit.
240
-
241
- # Default: true
242
- # gatherUsageStats = true
243
-
244
- # Port where users should point their browsers in order to connect to the
245
- # app.
246
-
247
- # This is used to:
248
- # - Set the correct URL for XSRF protection purposes.
249
- # - Show the URL on the terminal (part of `streamlit run`).
250
- # - Open the browser automatically (part of `streamlit run`).
251
-
252
- # This option is for advanced use cases. To change the port of your app, use
253
- # `server.Port` instead. Don't use port 3000 which is reserved for internal
254
- # development.
255
-
256
- # Default: whatever value is set in server.port.
257
- # serverPort = 8501
258
-
259
-
260
- [mapbox]
261
-
262
- # Configure Streamlit to use a custom Mapbox
263
- # token for elements like st.pydeck_chart and st.map.
264
- # To get a token for yourself, create an account at
265
- # https://mapbox.com. It's free (for moderate usage levels)!
266
-
267
- # Default: ""
268
- # token = ""
269
-
270
-
271
- [theme]
272
-
273
- # The preset Streamlit theme that your custom theme inherits from.
274
- # One of "light" or "dark".
275
- base = "dark"
276
-
277
- # Primary accent color for interactive elements.
278
- # primaryColor =
279
-
280
- # Background color for the main content area.
281
- # backgroundColor =
282
-
283
- # Background color used for the sidebar and most interactive widgets.
284
- # secondaryBackgroundColor =
285
-
286
- # Color used for almost all text.
287
- # textColor =
288
-
289
- # Font family for all text in the app, except code blocks. One of "sans serif",
290
- # "serif", or "monospace".
291
- # font =
 
1
+ # Below are all the sections and options you can have in ~/.streamlit/config.toml.
2
+
3
+
4
+ [global]
5
+
6
+ # By default, Streamlit displays a warning when a user sets both a widget
7
+ # default value in the function defining the widget and a widget value via
8
+ # the widget's key in `st.session_state`.
9
+
10
+ # If you'd like to turn off this warning, set this to True.
11
+
12
+ # Default: false
13
+ # disableWidgetStateDuplicationWarning = false
14
+
15
+ # If True, will show a warning when you run a Streamlit-enabled script
16
+ # via "python my_script.py".
17
+
18
+ # Default: true
19
+ # showWarningOnDirectExecution = true
20
+
21
+
22
+ [logger]
23
+
24
+ # Level of logging: 'error', 'warning', 'info', or 'debug'.
25
+
26
+ # Default: 'info'
27
+ # level = "info"
28
+
29
+ # String format for logging messages. If logger.datetimeFormat is set,
30
+ # logger messages will default to `%(asctime)s.%(msecs)03d %(message)s`. See
31
+ # [Python's documentation](https://docs.python.org/2.6/library/logging.html#formatter-objects)
32
+ # for available attributes.
33
+
34
+ # Default: "%(asctime)s %(message)s"
35
+ # messageFormat = "%(asctime)s %(message)s"
36
+
37
+
38
+ [client]
39
+
40
+ # Controls whether uncaught app exceptions and deprecation warnings
41
+ # are displayed in the browser. By default, this is set to True and
42
+ # Streamlit displays app exceptions and associated tracebacks, and
43
+ # deprecation warnings, in the browser.
44
+
45
+ # If set to False, deprecation warnings and full exception messages
46
+ # will print to the console only. Exceptions will still display in the
47
+ # browser with a generic error message. For now, the exception type and
48
+ # traceback show in the browser also, but they will be removed in the
49
+ # future.
50
+
51
+ # Default: true
52
+ # showErrorDetails = true
53
+
54
+ # Change the visibility of items in the toolbar, options menu,
55
+ # and settings dialog (top right of the app).
56
+
57
+ # Allowed values:
58
+ # * "auto" : Show the developer options if the app is accessed through
59
+ # localhost or through Streamlit Community Cloud as a developer.
60
+ # Hide them otherwise.
61
+ # * "developer" : Show the developer options.
62
+ # * "viewer" : Hide the developer options.
63
+ # * "minimal" : Show only options set externally (e.g. through
64
+ # Streamlit Community Cloud) or through st.set_page_config.
65
+ # If there are no options left, hide the menu.
66
+
67
+ # Default: "auto"
68
+ # toolbarMode = "auto"
69
+
70
+ # Controls whether the default sidebar page navigation in a multi-page app is displayed.
71
+
72
+ # Default: true
73
+ # showSidebarNavigation = true
74
+
75
+
76
+ [runner]
77
+
78
+ # Allows you to type a variable or string by itself in a single line of
79
+ # Python code to write it to the app.
80
+
81
+ # Default: true
82
+ # magicEnabled = true
83
+
84
+ # Handle script rerun requests immediately, rather than waiting for script
85
+ # execution to reach a yield point. This makes Streamlit much more
86
+ # responsive to user interaction, but it can lead to race conditions in
87
+ # apps that mutate session_state data outside of explicit session_state
88
+ # assignment statements.
89
+
90
+ # Default: true
91
+ # fastReruns = true
92
+
93
+ # Raise an exception after adding unserializable data to Session State.
94
+ # Some execution environments may require serializing all data in Session
95
+ # State, so it may be useful to detect incompatibility during development,
96
+ # or when the execution environment will stop supporting it in the future.
97
+
98
+ # Default: false
99
+ # enforceSerializableSessionState = false
100
+
101
+ # Adjust how certain 'options' widgets like radio, selectbox, and
102
+ # multiselect coerce Enum members when the Enum class gets
103
+ # re-defined during a script re-run.
104
+
105
+ # Allowed values:
106
+ # * "off": Disables Enum coercion.
107
+ # * "nameOnly": Enum classes can be coerced if their member names match.
108
+ # * "nameAndValue": Enum classes can be coerced if their member names AND
109
+ # member values match.
110
+
111
+ # Default: "nameOnly"
112
+ # enumCoercion = "nameOnly"
113
+
114
+
115
+ [server]
116
+
117
+ # List of folders that should not be watched for changes. This
118
+ # impacts both "Run on Save" and @st.cache.
119
+
120
+ # Relative paths will be taken as relative to the current working directory.
121
+
122
+ # Example: ['/home/user1/env', 'relative/path/to/folder']
123
+
124
+ # Default: []
125
+ # folderWatchBlacklist = []
126
+
127
+ # Change the type of file watcher used by Streamlit, or turn it off
128
+ # completely.
129
+
130
+ # Allowed values:
131
+ # * "auto" : Streamlit will attempt to use the watchdog module, and
132
+ # falls back to polling if watchdog is not available.
133
+ # * "watchdog" : Force Streamlit to use the watchdog module.
134
+ # * "poll" : Force Streamlit to always use polling.
135
+ # * "none" : Streamlit will not watch files.
136
+
137
+ # Default: "auto"
138
+ # fileWatcherType = "auto"
139
+
140
+ # Symmetric key used to produce signed cookies. If deploying on multiple replicas, this should
141
+ # be set to the same value across all replicas to ensure they all share the same secret.
142
+
143
+ # Default: randomly generated secret key.
144
+ # cookieSecret = "fbab6909be70b3321d1326e478a68ab9208cd0b53e6140383b75e6422554941f"
145
+
146
+ # If false, will attempt to open a browser window on start.
147
+
148
+ # Default: false unless (1) we are on a Linux box where DISPLAY is unset, or
149
+ # (2) we are running in the Streamlit Atom plugin.
150
+ headless = false
151
+
152
+ # Automatically rerun script when the file is modified on disk.
153
+
154
+ # Default: false
155
+ runOnSave = true
156
+
157
+ # The address where the server will listen for client and browser
158
+ # connections. Use this if you want to bind the server to a specific address.
159
+ # If set, the server will only be accessible from this address, and not from
160
+ # any aliases (like localhost).
161
+
162
+ # Default: (unset)
163
+ # address =
164
+
165
+ # The port where the server will listen for browser connections.
166
+
167
+ # Don't use port 3000 which is reserved for internal development.
168
+
169
+ # Default: 8501
170
+ # port = 8501
171
+
172
+ # The base path for the URL where Streamlit should be served from.
173
+
174
+ # Default: ""
175
+ # baseUrlPath = ""
176
+
177
+ # Enables support for Cross-Origin Resource Sharing (CORS) protection, for added security.
178
+
179
+ # Due to conflicts between CORS and XSRF, if `server.enableXsrfProtection` is on and
180
+ # `server.enableCORS` is off at the same time, we will prioritize `server.enableXsrfProtection`.
181
+
182
+ # Default: true
183
+ # enableCORS = true
184
+
185
+ # Enables support for Cross-Site Request Forgery (XSRF) protection, for added security.
186
+
187
+ # Due to conflicts between CORS and XSRF, if `server.enableXsrfProtection` is on and
188
+ # `server.enableCORS` is off at the same time, we will prioritize `server.enableXsrfProtection`.
189
+
190
+ # Default: true
191
+ # enableXsrfProtection = true
192
+
193
+ # Max size, in megabytes, for files uploaded with the file_uploader.
194
+
195
+ # Default: 200
196
+ # maxUploadSize = 200
197
+
198
+ # Max size, in megabytes, of messages that can be sent via the WebSocket connection.
199
+
200
+ # Default: 200
201
+ # maxMessageSize = 200
202
+
203
+ # Enables support for websocket compression.
204
+
205
+ # Default: false
206
+ # enableWebsocketCompression = false
207
+
208
+ # Enable serving files from a `static` directory in the running app's directory.
209
+
210
+ # Default: false
211
+ # enableStaticServing = false
212
+
213
+ # Server certificate file for connecting via HTTPS.
214
+ # Must be set at the same time as "server.sslKeyFile".
215
+
216
+ # ['DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.']
217
+ # sslCertFile =
218
+
219
+ # Cryptographic key file for connecting via HTTPS.
220
+ # Must be set at the same time as "server.sslCertFile".
221
+
222
+ # ['DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.']
223
+ # sslKeyFile =
224
+
225
+
226
+ [browser]
227
+
228
+ # Internet address where users should point their browsers in order to
229
+ # connect to the app. Can be IP address or DNS name and path.
230
+
231
+ # This is used to:
232
+ # - Set the correct URL for CORS and XSRF protection purposes.
233
+ # - Show the URL on the terminal
234
+ # - Open the browser
235
+
236
+ # Default: "localhost"
237
+ # serverAddress = "localhost"
238
+
239
+ # Whether to send usage statistics to Streamlit.
240
+
241
+ # Default: true
242
+ # gatherUsageStats = true
243
+
244
+ # Port where users should point their browsers in order to connect to the
245
+ # app.
246
+
247
+ # This is used to:
248
+ # - Set the correct URL for XSRF protection purposes.
249
+ # - Show the URL on the terminal (part of `streamlit run`).
250
+ # - Open the browser automatically (part of `streamlit run`).
251
+
252
+ # This option is for advanced use cases. To change the port of your app, use
253
+ # `server.Port` instead. Don't use port 3000 which is reserved for internal
254
+ # development.
255
+
256
+ # Default: whatever value is set in server.port.
257
+ # serverPort = 8501
258
+
259
+
260
+ [mapbox]
261
+
262
+ # Configure Streamlit to use a custom Mapbox
263
+ # token for elements like st.pydeck_chart and st.map.
264
+ # To get a token for yourself, create an account at
265
+ # https://mapbox.com. It's free (for moderate usage levels)!
266
+
267
+ # Default: ""
268
+ # token = ""
269
+
270
+
271
+ [theme]
272
+
273
+ # The preset Streamlit theme that your custom theme inherits from.
274
+ # One of "light" or "dark".
275
+ base = "dark"
276
+
277
+ # Primary accent color for interactive elements.
278
+ # primaryColor =
279
+
280
+ # Background color for the main content area.
281
+ # backgroundColor =
282
+
283
+ # Background color used for the sidebar and most interactive widgets.
284
+ # secondaryBackgroundColor =
285
+
286
+ # Color used for almost all text.
287
+ # textColor =
288
+
289
+ # Font family for all text in the app, except code blocks. One of "sans serif",
290
+ # "serif", or "monospace".
291
+ # font =
README.md CHANGED
@@ -6,6 +6,9 @@ colorTo: blue
6
  sdk: streamlit
7
  app_file: app.py
8
  pinned: false
 
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
6
  sdk: streamlit
7
  app_file: app.py
8
  pinned: false
9
+ sdk_version: 1.37.1
10
  ---
11
 
12
+ # Streamlit Part of Chatacter
13
+
14
+ Back to [Chatacter](https://github.com/AlphaSphereDotAI/chatacter)
app.py CHANGED
@@ -1,15 +1,15 @@
1
- import streamlit as st
2
-
3
- st.set_page_config(
4
- page_title="Chatacter",
5
- page_icon="πŸ§‘β€πŸŽ€",
6
- layout="wide",
7
- )
8
-
9
- st.title("πŸ˜€ Chatacter Alpha Version")
10
- st.write(
11
- "This is a simple character chatting app. Now we only support Napoleon Bonaparte"
12
- )
13
-
14
- if st.button("Start Chatting with Napoleon Bonaparte"):
15
- st.switch_page("pages/napoleon.py")
 
1
+ import streamlit as st
2
+
3
+ st.set_page_config(
4
+ page_title="Chatacter",
5
+ page_icon="πŸ§‘β€πŸŽ€",
6
+ layout="wide",
7
+ )
8
+
9
+ st.title("πŸ˜€ Chatacter Alpha Version")
10
+ st.write(
11
+ "This is a simple character chatting app. Now we only support Napoleon Bonaparte"
12
+ )
13
+
14
+ if st.button("Start Chatting with Napoleon Bonaparte"):
15
+ st.switch_page("pages/napoleon.py")
depshub.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: 1
2
+ licenses: ['MIT', 'Apache-1.1', 'Apache-2.0', 'Unlicense', 'BSD-2-Clause']
3
+ updates:
4
+ schedule: ['0 12 * * *'] # ['0 0 * * 6'] | ['off']
5
+ types: ['security', 'major', 'minor', 'patch'] # the order is important
6
+ stability_delay:
7
+ security: 0
8
+ major: 14
9
+ minor: 7
10
+ patch: 4
11
+ update_frequency: 30
12
+ batching:
13
+ security: 1
14
+ major: 1
15
+ minor: 3
16
+ patch: 10
17
+ group_by_scope: true
18
+ retry_on_close: false
19
+ pr:
20
+ weekly_limit: 2
21
+ concurrent_limit: 3
pages/napoleon.py CHANGED
@@ -1,47 +1,47 @@
1
- import os
2
-
3
- import pandas as pd
4
- import requests
5
-
6
- import streamlit as st
7
-
8
- st.set_page_config(
9
- page_title="Chat with Napoleon Bonaparte",
10
- page_icon="πŸ˜€",
11
- layout="wide",
12
- )
13
-
14
-
15
- def request_prediction(query: str):
16
- with st.status("Downloading data...", expanded=True) as status:
17
- st.write("Checking is the Chatacter alive")
18
- response = requests.get(f"{CONFIG['api']['localhost']}/", timeout=100)
19
- print(response)
20
- if response["status"] == "ok":
21
- st.write("Chatacter is alive")
22
- else:
23
- st.write("Chatacter is not alive")
24
- st.write("Chatacter is thinking")
25
- response_text = requests.post(
26
- f"{CONFIG['api']['localhost']}/get_text?query='{query}'",
27
- )
28
- st.write("Chatacter is generating the audio file")
29
- response_audio = requests.post(
30
- f"{CONFIG['api']['localhost']}/get_audio?query='{response_text}'"
31
- )
32
- st.write("Chatacter is generating the video file")
33
- response_video = requests.post(f"{CONFIG['api']['localhost']}/get_video")
34
- print(response_video)
35
- status.update(label="Download complete!", state="complete", expanded=False)
36
- return response
37
-
38
-
39
- st.title("😎 Chat with Napoleon Bonaparte")
40
- user_input = st.chat_input("Type your message here")
41
-
42
- if user_input is not None:
43
- message = st.chat_message("human")
44
- message.write("πŸ•’")
45
- response, audio = request_prediction(user_input)
46
- message.write(response)
47
- st.audio(audio, format="audio/wav")
 
1
+ import os
2
+
3
+ import pandas as pd
4
+ import requests
5
+
6
+ import streamlit as st
7
+
8
+ st.set_page_config(
9
+ page_title="Chat with Napoleon Bonaparte",
10
+ page_icon="πŸ˜€",
11
+ layout="wide",
12
+ )
13
+
14
+
15
+ def request_prediction(query: str):
16
+ with st.status("Downloading data...", expanded=True) as status:
17
+ st.write("Checking is the Chatacter alive")
18
+ response = requests.get(f"{CONFIG['api']['localhost']}/", timeout=100)
19
+ print(response)
20
+ if response["status"] == "ok":
21
+ st.write("Chatacter is alive")
22
+ else:
23
+ st.write("Chatacter is not alive")
24
+ st.write("Chatacter is thinking")
25
+ response_text = requests.post(
26
+ f"{CONFIG['api']['localhost']}/get_text?query='{query}'",
27
+ )
28
+ st.write("Chatacter is generating the audio file")
29
+ response_audio = requests.post(
30
+ f"{CONFIG['api']['localhost']}/get_audio?query='{response_text}'"
31
+ )
32
+ st.write("Chatacter is generating the video file")
33
+ response_video = requests.post(f"{CONFIG['api']['localhost']}/get_video")
34
+ print(response_video)
35
+ status.update(label="Download complete!", state="complete", expanded=False)
36
+ return response
37
+
38
+
39
+ st.title("😎 Chat with Napoleon Bonaparte")
40
+ user_input = st.chat_input("Type your message here")
41
+
42
+ if user_input is not None:
43
+ message = st.chat_message("human")
44
+ message.write("πŸ•’")
45
+ response, audio = request_prediction(user_input)
46
+ message.write(response)
47
+ st.audio(audio, format="audio/wav")
requirements.txt CHANGED
@@ -1,3 +1,6 @@
1
- streamlit
2
- requests
3
- pandas
 
 
 
 
1
+ streamlit
2
+ requests
3
+ pandas
4
+ pillow>=10.2.0 # not directly required, pinned by Snyk to avoid a vulnerability
5
+ tornado>=6.4.1 # not directly required, pinned by Snyk to avoid a vulnerability
6
+ pyarrow>=14.0.1 # not directly required, pinned by Snyk to avoid a vulnerability