tregu0458 commited on
Commit
517abe1
1 Parent(s): 5c3072f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -32,11 +32,13 @@ def run_workflow(message,language='en'):
32
  loader = OnlinePDFLoader(text_message)
33
  docs = loader.load()
34
  raw_text = docs[0].page_content
35
- else:
36
  # それ以外の場合
37
  loader = WebBaseLoader(text_message)
38
  docs = loader.load()
39
  raw_text = docs[0].page_content
 
 
40
 
41
 
42
  # APIリクエストのための入力データを準備
 
32
  loader = OnlinePDFLoader(text_message)
33
  docs = loader.load()
34
  raw_text = docs[0].page_content
35
+ elif text_message.startswith("http") or text_message.startswith("https"):
36
  # それ以外の場合
37
  loader = WebBaseLoader(text_message)
38
  docs = loader.load()
39
  raw_text = docs[0].page_content
40
+ else:
41
+ raw_text = text_message
42
 
43
 
44
  # APIリクエストのための入力データを準備