File size: 23,484 Bytes
565f5a2
 
 
 
 
0d499ae
9abc53e
565f5a2
 
9abc53e
fd9103b
565f5a2
 
fd9103b
9abc53e
703371c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9abc53e
 
 
 
 
 
 
cd7dc2b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9abc53e
 
 
cd7dc2b
c14f973
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cd7dc2b
 
565f5a2
cd7dc2b
 
0d499ae
40e2bb2
 
 
 
cb269f5
565f5a2
 
 
 
cb269f5
 
 
 
ab31d59
565f5a2
 
ab31d59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565f5a2
 
9abc53e
565f5a2
f90cdcd
565f5a2
 
f90cdcd
 
 
 
 
 
 
 
 
7e0505e
 
 
9abc53e
 
 
565f5a2
 
 
ff385fd
565f5a2
 
 
ff385fd
 
 
565f5a2
 
 
9abc53e
39119c2
 
 
 
 
 
9abc53e
 
ff385fd
9abc53e
565f5a2
9abc53e
 
565f5a2
 
 
fd9103b
 
 
565f5a2
9abc53e
6bbef59
 
 
7e0505e
6bbef59
 
 
90528b7
 
 
565f5a2
90528b7
 
565f5a2
90528b7
8c6842b
 
 
 
 
 
 
5fe394b
 
 
 
 
 
 
 
 
 
 
74f814f
 
 
 
 
 
 
 
 
 
5fe394b
8c6842b
74f814f
 
565f5a2
74f814f
950766d
 
 
 
 
 
 
 
 
 
 
 
 
 
565f5a2
 
 
 
 
 
 
 
 
703371c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565f5a2
950766d
565f5a2
 
 
 
83c58a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565f5a2
 
 
950766d
565f5a2
950766d
32acd0b
950766d
32acd0b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8c6842b
 
565f5a2
 
ab31d59
56e157b
 
 
 
565f5a2
 
cb269f5
0d499ae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
ToDo:


===========================================================================================================


- Get API keys and passwords from environment !:
  Done



===========================================================================================================


- Save the vectorstore in a persistent location !:

https://huggingface.co/docs/hub/spaces-storage
!!!!! !!!!! !!!!!

Disk usage on Spaces
Every Space comes with a small amount of disk storage. This disk space is ephemeral,
meaning its content will be lost if your Space restarts or is stopped.
If you need to persist data with a longer lifetime than the Space itself, you can:

Subscribe to a persistent storage upgrade
https://huggingface.co/docs/hub/spaces-storage#persistent-storage

Use a dataset as a data store
https://huggingface.co/docs/hub/spaces-storage#dataset-storage
!!!!!

Persistent storage
You can upgrade your Space to have access to persistent disk space from the Settings tab.


You can choose the storage tier of your choice to access disk space that persists across restarts of your Space.

Persistent storage acts like traditional disk storage mounted on /data.

That means you can read and write to this storage from your Space as you would with a traditional hard drive or SSD.

Persistent disk space can be upgraded to a larger tier at will, though it cannot be downgraded to a smaller tier. If you wish to use a smaller persistent storage tier, you must delete your current (larger) storage first.

If you are using Hugging Face open source libraries, you can make your Space restart faster by setting the environment variable HF_HOME to /data/.huggingface. Libraries like transformers, diffusers, datasets and others use that environment variable to cache any assets downloaded from the Hugging Face Hub. Setting this variable to the persistent storage path will make sure that cached resources do not need to be re-downloaded when the Space is restarted.

WARNING: all data stored in the storage is lost when you delete it.
Persistent storage specs
Here are the specifications for each of the different upgrade options:

Tier	Disk space	Persistent	Monthly Price
Free tier	50GB	No (ephemeral)	Free!
Small	20GB	Yes	$5
Medium	150 GB	Yes	$25
Large	1TB	Yes	$100
Billing
Billing of Spaces is based on hardware usage and is computed by the minute: you get charged for every minute the Space runs on the requested hardware, regardless of whether the Space is used.

Persistent storage upgrades are billed until deleted, even when the Space is not running and regardless of Space status or running state.

Additional information about billing can be found in the dedicated Hub-wide section.

Dataset storage
If you need to persist data that lives longer than your Space, you could use a dataset repo.

You can find an example of persistence here, which uses the huggingface_hub library for programmatically uploading files to a dataset repository. This Space example along with this guide will help you define which solution fits best your data type.

Visit the datasets library documentation and the huggingface_hub client library documentation for more information on how to programmatically interact with dataset repos.


...


HF Spaces has an ephermal, non-persistent file storage!
If you save a file from within your (streamlit) application,
that file is not kept when your session has ended.
Solution: save that file in a persistent location
such as AWS bucket, GITHUB, or on HF.

See:
julien-c/persistent-space-dataset · Datasets at Hugging Face

https://huggingface.co/datasets/julien-c/persistent-space-dataset

HF SPACES STREAMLIT APPS - GET PASSWORDS AND ACCESS TOKENS FROM HF ENVIRONMENT ! - PERSISTENT STORAGE ON HF SPACES ! - EAGLE SHELTER VERTAAL APP ETC ! - app.py · julien-c/persistent-data at main - 20-03-2024 !!!!! !!!!! !!!!!

https://huggingface.co/spaces/julien-c/persistent-data/blob/main/app.py

——->


DUPLICATED TO:
https://huggingface.co/spaces/JBHF/persistent-data?logs=container



EVERNOTE :
https://www.evernote.com/shard/s313/nl/41973486/1b07098e-3376-4316-abb3-b3d0996ebf03/
HF SPACES STREAMLIT APPS - GET PASSWORDS AND ACCESS TOKENS FROM HF ENVIRONMENT ! - PERSISTENT STORAGE ON HF SPACES ! - EAGLE SHELTER VERTAAL APP ETC ! - app.py · julien-c/persistent-data at main - 20-03-2024 !!!!! !!!!! !!!!!



20-03-2024


---


HF SPACES STREAMLIT APPS - GET PASSWORDS AND ACCESS TOKENS FROM HF ENVIRONMENT ! - PERSISTENT STORAGE ON HF SPACES ! - EAGLE SHELTER VERTAAL APP ETC ! - app.py · julien-c/persistent-data at main - 20-03-2024 !!!!! !!!!! !!!!!

https://huggingface.co/spaces/julien-c/persistent-data/blob/main/app.py

——->


DUPLICATED TO:
https://huggingface.co/spaces/JBHF/persistent-data?logs=container
...



------------------

I want to persist files in a Streamlit python application on Hugging Faces. Explain me in painstakingly detail how to do that - POE WEB-SEARCH - 22-03-2024 !!!!!

POE WEB-SEARCH:
https://poe.com/s/6MTNnCP4tYGFqXUgjppX


EVERNOTE :
https://www.evernote.com/shard/s313/nl/41973486/87117657-5e23-497d-af42-0dac60f5e68f/
I want to persist files in a Streamlit python application on Hugging Faces. Explain me in painstakingly detail how to do that - POE WEB-SEARCH - 22-03-2024 !!!!!



22-03-2024


---

I want to persist files in a Streamlit python application on Hugging Faces. Explain me in painstakingly detail how to do that - POE WEB-SEARCH - 22-03-2024 !!!!!

POE WEB-SEARCH:
https://poe.com/s/6MTNnCP4tYGFqXUgjppX



Knip bron: I%20want%20to%20persist%20files%20in%20a%20Streamlit%20python%20application%20on%20Hugging%20Faces.%20Explain%20me%20in%20painstakingly%20detail%20how%20to%20do%20that%20-%20Poe



Shared conversation
Web-Search · 14:37

I want to persist files in a Streamlit python application on Hugging Faces. Explain me in painstakingly detail how to do that



Web-Search
	Poe
	
To persist files in a Streamlit Python application on Hugging Faces, you can follow these steps:

1. Choose a storage solution: First, you need to decide on a storage solution to persist your files. Some popular options include local file storage, cloud storage services like Amazon S3 or Google Cloud Storage, or using the Hugging Face Datasets library.
2. Import the necessary libraries: Depending on the storage solution you choose, you may need to import the corresponding libraries. For example, if you're using Hugging Face Datasets, you'll need to import the datasets library.
3. Create a function to save the files: Write a function that takes the file data as input and saves it to the chosen storage solution. This function should handle any necessary authentication or authorization steps required by the storage solution.
4. Integrate the function into your Streamlit app: In your Streamlit app, create a file upload component using the st.file_uploader function. When a file is uploaded, pass the file data to the save function you created in the previous step to persist it.
5. Display the persisted files: If you want to display the persisted files in your Streamlit app, you can retrieve them from the storage solution and render them using Streamlit's built-in components like st.image or st.download_button.

Here's an example of how you can persist files using Hugging Face Datasets:

	python
```
import streamlit as st
from datasets import Dataset
# Create a function to save the files
def save_files(file_data):
    # Save the file data to a persistent dataset using Hugging Face Datasets
    dataset = Dataset.from_dict({"file_data": file_data})
    dataset.save_to_disk("path/to/dataset")
# Create the Streamlit app
def main():
    st.title("File Upload App")
    file = st.file_uploader("Upload a file")
    if file is not None:
        # Read the file data
        file_data = file.read()

        # Save the file
        save_files(file_data)

        st.success("File saved successfully!")
if __name__ == "__main__":
    main()

```

In this example, the save_files function takes the file data as input and saves it to a persistent dataset using Hugging Face Datasets. The main function is the entry point of the Streamlit app and includes a file upload component. When a file is uploaded, the file data is passed to the save_files function to persist it.
---
Learn more:
1. Save Data from Streamlit Session to Persist Changes to HF Datasets - Datasets - Hugging Face Forums
2. Streamlit Spaces
3. Deploy your Streamlit Web App Using Hugging Face | by Imanuelyosi | Medium






Can you provide an example of how to retrieve and display the persisted files in the Streamlit app?


Web-Search
	Poe
	
Certainly! Here's an example of how you can retrieve and display persisted files in a Streamlit app:

	python
```
import streamlit as st
from datasets import Dataset
# Function to retrieve the persisted files
def retrieve_files():
    # Load the dataset containing the persisted files using Hugging Face Datasets
    dataset = Dataset.load_from_disk("path/to/dataset")
    # Retrieve the file data from the dataset
    file_data = dataset["file_data"]
    return file_data
# Create the Streamlit app
def main():
    st.title("Persisted Files App")
    # Retrieve the persisted files
    file_data = retrieve_files()

    # Display the persisted files
    if file_data:
        for file in file_data:
            st.write(f"File Name: {file.name}")
            st.write(f"File Size: {file.size} bytes")
            st.write(f"File Type: {file.type}")
            st.write("---")
if __name__ == "__main__":
    main()

```

In this example, the retrieve_files function loads the dataset containing the persisted files using Hugging Face Datasets and retrieves the file data. The main function is the entry point of the Streamlit app. It calls the retrieve_files function to get the persisted files and then displays the file name, size, and type using Streamlit's st.write function.
---
Learn more:
1. Streamlit Share - Persist files - ☁️ Community Cloud - Streamlit
2. View files from streamlit cloud - ☁️ Community Cloud - Streamlit
3. Where are saved files? -  Deployment - Streamlit






How can I install the Hugging Face Datasets library?


Web-Search
	Poe
	
To install the Hugging Face Datasets library, you can follow these steps:

1. Virtual environment: It is recommended to install Hugging Face Datasets in a virtual environment to keep things organized and avoid dependency conflicts. You can create and navigate to your project directory using the following commands:
2. Activate virtual environment: Start a virtual environment inside your project directory. You can activate the virtual environment with the following command:
3. Install with pip: The most straightforward way to install Hugging Face Datasets is using pip. Run the following command to install the library:
4. Verify installation: To check if Hugging Face Datasets has been properly installed, you can run the following command:
   
   This command downloads version 1 of the Stanford Question Answering Dataset (SQuAD), loads the training split, and prints the first training example.

That's it! You have successfully installed the Hugging Face Datasets library.
---
Learn more:
1. Installation — datasets 1.11.0 documentation - Hugging Face
2. Installation
3. Installation - datasets 1.16.1 documentation






How can I save a FAISS vector store file as a persistent file generated as part of a RAG application running as Streamlit application on Hugging Face Spaces


Web-Search
	Poe
	
To save a FAISS vector store file as a persistent file in a RAG application running as a Streamlit application on Hugging Face Spaces, you can follow these steps:

1. Import the necessary libraries: First, make sure you have the required libraries installed. You will need faiss for working with the FAISS vector store and huggingface_hub for saving the file to a persistent location.
2. Load the FAISS vector store: Use the faiss.read_index function to load the FAISS index from the vector store file. This will give you an instance of the FAISS index that you can work with.
3. Perform your operations: Perform any necessary operations on the FAISS index, such as querying or updating the vectors.
4. Save the FAISS index: Once you have made the desired changes to the FAISS index, you can save it as a persistent file. To do this, you can use the index.serialize method provided by FAISS. This method serializes the index into a byte array.
5. Upload the serialized index: To save the serialized index as a persistent file in Hugging Face Spaces, you can use the huggingface_hub.upload_file method. This method allows you to upload a file to a specific repository on the Hugging Face Hub. You will need to provide the path to the serialized index file, the path in the repository where you want to save it, the repository ID, and your Hugging Face token.
6. Access the persistent file: Once the file is uploaded, you can access it from your Streamlit application running on Hugging Face Spaces by using the appropriate URL or path.

Here is an example code snippet that demonstrates these steps:

	python
```
import faiss
from huggingface_hub import upload_file
# Step 1: Import the necessary libraries

# Step 2: Load the FAISS vector store
index = faiss.read_index('path/to/vector_store.faiss')
# Step 3: Perform your operations

# Step 4: Save the FAISS index
serialized_index = faiss.serialize_index(index)

# Step 5: Upload the serialized index
upload_file(serialized_index, path_in_repo='path/in/repo/vector_store.faiss', repo_id='your_repo_id', token='your_token')
# Step 6: Access the persistent file
# You can access the file using the appropriate URL or path in your Streamlit application

```

Please note that you will need to replace 'path/to/vector_store.faiss' with the actual path to your FAISS vector store file, 'path/in/repo/vector_store.faiss' with the desired path in your repository, 'your_repo_id' with the ID of your repository on the Hugging Face Hub, and 'your_token' with your Hugging Face token.
---
Learn more:
1. Save Data from Streamlit Session to Persist Changes to HF Datasets - Datasets - Hugging Face Forums
2. Write to a file in spaces - Spaces - Hugging Face Forums
3. Upload File API for Saving to Persistent Datasets on HF Spaces - Datasets - Hugging Face Forums






How can I load the FAISS index back in from the persistent file


Web-Search
	Poe
	
To load a FAISS index from a persistent file in Python, you can use the faiss.read_index function. This function allows you to read the index from a file and load it back into memory. Here's how you can do it:

	python
```
import faiss
# Specify the path to the persistent file
filename = "path/to/index_file"

# Load the index from the persistent file
index = faiss.read_index(filename)

```

In the code above, you need to replace "path/to/index_file" with the actual path to your persistent file.

Once you have loaded the index, you can use it for similarity search or any other operations supported by FAISS.

---
Learn more:
1. python - How to write a Faiss index to memory? - Stack Overflow
2. Faiss: A library for efficient similarity search - Engineering at Meta
3. Introduction to Facebook AI Similarity Search (Faiss) | Pinecone


This conversation may have been edited by the sharer.


Talk to Web-Search on Poe


---


------------------



===========================================================================================================


- Settings: wide mode as default setting

Zie:
https://docs.streamlit.io/library/advanced-features/app-menu




===========================================================================================================

- File uploader:

https://docs.streamlit.io/library/api-reference/widgets/st.file_uploader


===========================================================================================================

- https://www.datacamp.com/tutorial/streamlit:

st.title(): This function allows you to add the title of the app. 

st.header(): This function is used to set header of a section. 

st.markdown(): This function is used to set a markdown of a section. 

st.subheader(): This function is used to set sub-header of a section. 

st.caption(): This function is used to write caption. 

st.code(): This function is used to set a code. 

st.latex(): This function is used to display mathematical expressions formatted as LaTeX.

st.title ("this is the app title")
st.header("this is the header ")
st.markdown("this is the markdown")
st.subheader("this is the subheader")
st.caption("this is the caption")
st.code("x=2021")
st.latex(r''' a+a r^1+a r^2+a r^3 ''')


===========================================================================================================

- Show the complete history of questions and answers:

  - Gewoon chat venster met weergave van complete chat history in de actuele sessie: DONE
  - ToDo: save session chat history from user + AI in a messages list (and persistently save them !)

Done (persistence not yet done !):

    # Show total messages history of user + AI in this session up till this point
    with st.expander("Show total messages history of user + AI in this session up till this point"):
        # st.session_state.messages
        st.write(st.session_state.messages)
        st.write("--------------------------------")


Persisteren zou ook geïmplementeerd kunnen worden door iedere message of de complete messages history
binnen een sessie te emailen !

...



===========================================================================================================

- Kies de taal waarin geantwoord moet worden:
  - Voor Nederlands, Engels, Duits, Frans en Spaans reeds gedaan
  - Uitbreiden naar een veel grotere lijst met (belangrijke) wereldtalen
  - 
...
  

===========================================================================================================


- Choose llm temperature using a slider:
Geef de temperature weer in woorden, zoals
deterministisch,
enigszins creatief,
behoorlijk creatief,
heel creatief

...



===========================================================================================================


- Possibility to choose an alternative LLM:
.,




===========================================================================================================

21-03-2024:
TOE TE VOEGEN:

- bewaren van de vragen die users hebben gesteld (evt dmv emailen van de vragen ?)

- stel bullshit vragen

- Foto's van Victor en Jan tonen in app:

st.image('sunrise.jpg', caption='Sunrise by the mountains')
Done


===========================================================================================================

27-03-2024:
TOE TE VOEGEN / WIJZIGEN:

- De chat laat nu een doorlopende conversatie zie tussen de AI en de USER, die ieder door een icoon worden gerepresenteerd.
  Kunnen die iconen ook door een image worden vervangen (vooral de icoon van de AI, dat zou de foto van Victor kunnen zijn,
  want hij geeft in principe de antwoorden (via de AI)!)

- Taalkiezer:
  Een vraag die de goede vraagstelling heeft om puur Nederlandstalige response op te krijgen is bijvoorbeeld deze:
  "Ik wil zelf pottenbakken. Leg me uit wat ik daarvoor moet doen.
  Antwoord uitsluitend en alleen in de Nederlandse taal en beslist niet in een andere taal als Nederlands."

  De toevoeging "Antwoord uitsluitend en alleen in de Nederlandse taal en beslist niet in een andere taal als Nederlands."
  is kennelijk voldoende om antwoorden in het Nederlands te krijgen!
  Dus de taalkiezer moet na een gedane keuze die toevoeging aan een USER query worden toegevoegd
  alvorens die query verder te verwerken.

  Een geschikte talenkiezer in Streamlit is:
  https://docs.streamlit.io/library/api-reference/widgets/st.selectbox

  Example
import streamlit as st

option = st.selectbox(
    'How would you like to be contacted?',
    ('Email', 'Home phone', 'Mobile phone'))

st.write('You selected:', option)
  ...



===========================================================================================================

- STREAMLIT STATUS WEERGEVEN (VOORAL BIJ LANGDURIGE PROCESSEN, ZOALS HET GENEREREN VAN DE VECTORSTORE):

Voorbeeld code:

with st.status("Downloading data...", expanded=True) as status:
    st.write("Searching for data...")
    time.sleep(2)
    st.write("Found URL.")
    time.sleep(1)
    st.write("Downloading data...")
    time.sleep(1)
    status.update(label="Download complete!", state="complete", expanded=False)


===========================================================================================================

- STREAMLIT MULTIPAGE APP

  Om apart kiesbare pagina's te creëren voor:
  - Help pagina
  - Voorbeeld vragen die je aan de AI kunt stellen
  - Etc

ZIE:
STREAMLIT MULTIPAGE APP STARTER KIT - TBV NON-TOXIC GLAZE ADVISOR APP - 02-2024 https://dataprofessor-multipage-app-starter-kit--home-1qqhko.streamlit.app/

https://dataprofessor-multipage-app-starter-kit--home-1qqhko.streamlit.app/



dataprofessor/multipage-app-starter-kit
https://github.com/dataprofessor/multipage-app-starter-kit

https://dataprofessor-multipage-app-starter-kit--home-1qqhko.streamlit.app/

https://docs.streamlit.io/library/advanced-features/multipage-apps
https://docs.streamlit.io/get-started/tutorials/create-a-multipage-app
https://discuss.streamlit.io/t/put-logo-and-title-above-on-top-of-page-navigation-in-sidebar-of-multipage-app/28213?u=dataprofessor


TOEPASSEN OP:
https://huggingface.co/spaces/JBHF/NonToxicGlazeAdvisor_Chat_with_Docs_Groq_Edition_1?logs=container

https://jbhf-nontoxicglazeadvisor-chat-with-docs-groq-edition-1.hf.space/?embed=true&embed_options=show_toolbar#adviseur-voor-niet-giftige-glazuren


EVERNOTE :
https://www.evernote.com/shard/s313/nl/41973486/a93e39ae-d0f2-4e03-a6ec-873703f72552/
STREAMLIT MULTIPAGE APP STARTER KIT - TBV NON-TOXIC GLAZE ADVISOR APP - 02-2024 https://dataprofessor-multipage-app-starter-kit--home-1qqhko.streamlit.app/



03-04-2024





- Show a set of example questions to the user
VOORBEELDVRAGEN.txt


Eerste versie vragen:

Hoe kan ik thuis als hobby keramiek maken? Geef het antwoord uitsluitend en alleen in de Nederlands taal 

Geef een samenvatting in 10 zinnen.

Geef een samenvatting in 25 bullet points.

Geef een samenvatting in 25 bullet points. Geef het antwoord uitsluitend en alleen in de Nederlandse taal.

Geef een samenvatting in 25 bullet points. Geef het antwoord uitsluitend en alleen in de Duitse taal.

Explain glazing techniques to me as if I am 10 years old.

Geef me uitleg over glazuurtechnieken alsof ik 5 jaar oud ben. Geef het antwoord uitsluitend en alleen in de Nederlandse taal.



- Tab pages in streamlit?
st.tabs - Streamlit Docs

https://docs.streamlit.io/library/api-reference/layout/st.tabs

Bijvoorbeeld:

import streamlit as st

tab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])

with tab1:
   st.header("A cat")
   st.image("https://static.streamlit.io/examples/cat.jpg", width=200)

with tab2:
   st.header("A dog")
   st.image("https://static.streamlit.io/examples/dog.jpg", width=200)

with tab3:
   st.header("An owl")
   st.image("https://static.streamlit.io/examples/owl.jpg", width=200)


===========================================================================================================


- Word to PDF:

https://www.ilovepdf.com/word_to_pdf

===========================================================================================================


- ...