mdevora commited on
Commit
f73f091
·
1 Parent(s): 271158e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -65,8 +65,8 @@ txts_dir = docs_dir + 'txt/'
65
  # with open(f'{docs_dir}intents/{row["intent"]}_{intent_index}.txt', 'w') as f:
66
  # f.write(row['response'])
67
  # previous_row = row
68
- loader = DirectoryLoader(txts_dir)
69
- txt_documents = loader.load()
70
  loader = UnstructuredURLLoader(urls=['https://sherlock-ph.readthedocs.io/en/latest/',
71
  'https://tkmatrix.readthedocs.io/en/latest/',
72
  'https://dearwatson.readthedocs.io/en/latest/',
@@ -174,14 +174,13 @@ def chat(message, history):
174
  # print(f"Sources: {response['source_documents']}")
175
 
176
  gr.ChatInterface(chat, chatbot=gr.Chatbot(),
177
- textbox=gr.Textbox(placeholder="Ask me about SHERLOCK, MATRIX or WATSON!", container=False, scale=7),
178
- title="PlanetHunters informative chatbot",
179
- description="Ask anything related to SHERLOCK, MATRIX, WATSON and their related papers!",
180
  theme="soft",
181
- examples=["What is SHERLOCK?", "What is MATRIX?", "What are the foundational papers of SHERLOCK?",
182
- "How should I cite SHERLOCK?", "How should I cite MATRIX?"],
183
  cache_examples=False,
184
  retry_btn=None,
185
- undo_btn="Delete Previous",
186
- clear_btn="Clear").queue().launch()
187
 
 
65
  # with open(f'{docs_dir}intents/{row["intent"]}_{intent_index}.txt', 'w') as f:
66
  # f.write(row['response'])
67
  # previous_row = row
68
+ #loader = DirectoryLoader(txts_dir)
69
+ #txt_documents = loader.load()
70
  loader = UnstructuredURLLoader(urls=['https://sherlock-ph.readthedocs.io/en/latest/',
71
  'https://tkmatrix.readthedocs.io/en/latest/',
72
  'https://dearwatson.readthedocs.io/en/latest/',
 
174
  # print(f"Sources: {response['source_documents']}")
175
 
176
  gr.ChatInterface(chat, chatbot=gr.Chatbot(),
177
+ textbox=gr.Textbox(placeholder="Pregúntame lo que quieras sobre INGGRIM!", container=False, scale=7),
178
+ title="Todo sobre la novela río: INGGRIM",
179
+ description="Pregúntame lo que quieras sobre INGGRIM!",
180
  theme="soft",
181
+ examples=["¿Quién es Stewart David?", "¿Cuáles son las facciones presentes en INGGRIM?", "¿Cómo es el mapa del mundo de INGGRIM?"],
 
182
  cache_examples=False,
183
  retry_btn=None,
184
+ undo_btn="Borrar anterior",
185
+ clear_btn="Borrar").queue().launch()
186