aditibera commited on
Commit
fe162a1
·
verified ·
1 Parent(s): 41ff453
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -12,7 +12,7 @@ with open("formatted_travel_tips.txt", "r", encoding="utf-8") as file:
12
  # STEP 3 FROM SEMANTIC SEARCH
13
  def preprocess_text(text): # Clean raw text and split it into non-empty chunks
14
  cleaned_text = text.strip()
15
- chunks = cleaned_text.split("\n")
16
  cleaned_chunks = []
17
 
18
  for chunk in chunks:
@@ -108,10 +108,7 @@ def submit_survey(name, country):
108
  return f"Thank you, {name}! Your survey response has been recorded.", name, country
109
 
110
 
111
- with gr.Blocks(theme = gr.themes.Soft(
112
- primary_hue="yellow",
113
- neutral_hue="#fcf1db",
114
- )) as demo:
115
  name_state = gr.State()
116
  country_state = gr.State()
117
  chat_state = gr.State([])
 
12
  # STEP 3 FROM SEMANTIC SEARCH
13
  def preprocess_text(text): # Clean raw text and split it into non-empty chunks
14
  cleaned_text = text.strip()
15
+ chunks = cleaned_text.split("+")
16
  cleaned_chunks = []
17
 
18
  for chunk in chunks:
 
108
  return f"Thank you, {name}! Your survey response has been recorded.", name, country
109
 
110
 
111
+ with gr.Blocks() as demo:
 
 
 
112
  name_state = gr.State()
113
  country_state = gr.State()
114
  chat_state = gr.State([])