KeshavRa commited on
Commit
107aa83
·
verified ·
1 Parent(s): f41898f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -290,7 +290,7 @@ if selected_app == "4) Create Chatbot":
290
  datasets
291
  '''
292
 
293
- app = """
294
  import os
295
  import streamlit as st
296
  from datasets import load_dataset
@@ -397,9 +397,9 @@ if selected_app == "4) Create Chatbot":
397
  # Return the list of dictionaries
398
  return result
399
 
400
- st.sidebar.markdown(f'''This is a chatbot to help you learn more about {organization_name}''')
401
 
402
- domain = st.sidebar.selectbox(f"Select a topic", {domains})
403
 
404
  special_threshold = 0.3
405
 
@@ -419,7 +419,7 @@ if selected_app == "4) Create Chatbot":
419
  ###
420
  ###
421
 
422
- initial_input = f"Tell me about {organization_name}"
423
 
424
  # Initialize a new client for ChromeDB.
425
  client = chromadb.Client()
@@ -438,7 +438,7 @@ if selected_app == "4) Create Chatbot":
438
  # Create a new collection in ChromeDB with the combined string as its name.
439
  collection = client.create_collection(combined_string)
440
 
441
- st.title(f"{organization_name} Chatbot")
442
 
443
  # Initialize chat history
444
  if "messages" not in st.session_state:
@@ -483,7 +483,7 @@ if selected_app == "4) Create Chatbot":
483
  st.markdown(message["content"])
484
 
485
  # React to user input
486
- if prompt := st.chat_input(f"Tell me about {organization_name"):
487
  # Display user message in chat message container
488
  st.chat_message("user").markdown(prompt)
489
  # Add user message to chat history
 
290
  datasets
291
  '''
292
 
293
+ app = f"""
294
  import os
295
  import streamlit as st
296
  from datasets import load_dataset
 
397
  # Return the list of dictionaries
398
  return result
399
 
400
+ st.sidebar.markdown('''This is a chatbot to help you learn more about {organization_name}''')
401
 
402
+ domain = st.sidebar.selectbox("Select a topic", "")
403
 
404
  special_threshold = 0.3
405
 
 
419
  ###
420
  ###
421
 
422
+ initial_input = "Tell me about {organization_name}"
423
 
424
  # Initialize a new client for ChromeDB.
425
  client = chromadb.Client()
 
438
  # Create a new collection in ChromeDB with the combined string as its name.
439
  collection = client.create_collection(combined_string)
440
 
441
+ st.title("{organization_name} Chatbot")
442
 
443
  # Initialize chat history
444
  if "messages" not in st.session_state:
 
483
  st.markdown(message["content"])
484
 
485
  # React to user input
486
+ if prompt := st.chat_input("Tell me about {organization_name"):
487
  # Display user message in chat message container
488
  st.chat_message("user").markdown(prompt)
489
  # Add user message to chat history