devve1 commited on
Commit
ab422ce
1 Parent(s): 06317c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -8,6 +8,7 @@ import vllm
8
  import msgpack
9
  import validators
10
  import numpy as np
 
11
  import streamlit as st
12
  from typing import List
13
  from numpy import ndarray
@@ -375,7 +376,22 @@ if __name__ == '__main__':
375
 
376
  client, collection_name, tokenizer, model, llm, dense_model, sparse_model = load_models_and_documents()
377
 
378
- #if menu_id == 'Documents':
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
 
380
  conversations_path = os.path.join(os.getenv('HF_HOME'), 'conversations')
381
 
 
8
  import msgpack
9
  import validators
10
  import numpy as np
11
+ import pandas as pd
12
  import streamlit as st
13
  from typing import List
14
  from numpy import ndarray
 
376
 
377
  client, collection_name, tokenizer, model, llm, dense_model, sparse_model = load_models_and_documents()
378
 
379
+ if menu_id == 'Documents':
380
+ edited_df = st.data_editor(
381
+ pd.DataFrame(),
382
+ num_rows="fixed",
383
+ column_config={
384
+ "document": st.column_config.TextColumn(
385
+ "Documents",
386
+ help="Name of the document",
387
+ max_chars=50,
388
+ validate="^st\.[a-z_]+$",
389
+ ),
390
+ "link": st.column_config.LinkColumn(
391
+
392
+ )
393
+ }
394
+ )
395
 
396
  conversations_path = os.path.join(os.getenv('HF_HOME'), 'conversations')
397