JosephH commited on
Commit
0230ec8
·
1 Parent(s): 161765e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -12,7 +12,7 @@ with open(text_file_path, 'r', encoding='utf-8') as file:
12
  text_content = file.read()
13
 
14
  # split text into sentences
15
- allText = [sentence.strip() for sentence in text_content.split('\n') if sentence.strip()]
16
 
17
  def encode_open(input):
18
  # you can change model if you want different
@@ -38,13 +38,14 @@ def search_openai_pdf(query, k=10):
38
  allText[_id] for _id in top_k[1][0]
39
  ]
40
 
41
- search_openai_pdf("ibadet neden etmeliyim")
42
 
43
  iface = gr.Interface(
44
  fn=search_openai_pdf,
45
- inputs=gr.Textbox(placeholder="ibadet neden etmeliyim",label='query'),
46
  outputs=gr.Textbox(label="Sonuçlar"),
47
- live=False
 
48
  )
49
 
50
  iface.launch()
 
12
  text_content = file.read()
13
 
14
  # split text into sentences
15
+ allText = [sentence.strip() for sentence in text_content.split('<br>') if sentence.strip()]
16
 
17
  def encode_open(input):
18
  # you can change model if you want different
 
38
  allText[_id] for _id in top_k[1][0]
39
  ]
40
 
41
+ #search_openai_pdf("ibadet neden etmeliyim")
42
 
43
  iface = gr.Interface(
44
  fn=search_openai_pdf,
45
+ inputs=gr.Textbox(placeholder="Fihristte aramak için bir şeyler yaz.",label='query'),
46
  outputs=gr.Textbox(label="Sonuçlar"),
47
+ live=False,
48
+ title="Sözler Fihristi Anlamsal Arama Motoru"
49
  )
50
 
51
  iface.launch()