File tree 2 files changed +6
-10
lines changed
2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 5
5
6
6
setuptools .setup (
7
7
name = "text2text" ,
8
- version = "1.6.6 " ,
8
+ version = "1.6.7 " ,
9
9
author = "artitw" ,
10
10
author_email = "artitw@gmail.com" ,
11
11
description = "Text2Text: Crosslingual NLP/G toolkit" ,
Original file line number Diff line number Diff line change 1
1
import os
2
2
import ollama
3
- import psutil
4
3
import time
5
4
import subprocess
6
5
import warnings
7
- import requests
8
-
9
- import text2text as t2t
10
6
11
7
from llama_index .llms .ollama import Ollama
12
8
from llama_index .core .llms import ChatMessage
@@ -64,11 +60,11 @@ def load_model(self):
64
60
if return_code != 0 :
65
61
raise Exception ("Cannot install lshw." )
66
62
67
- response = requests . get ( "https://ollama.com/install.sh" )
68
- install_script = response . text
69
- result = run_sh ( install_script )
70
- if result and "Install complete." not in result and "will run in CPU-only mode." not in result :
71
- raise Exception (result )
63
+ result = os . system (
64
+ "curl -fsSL https://ollama.com/install.sh | sh"
65
+ )
66
+ if result != 0 :
67
+ raise Exception ("Cannot install ollama" )
72
68
73
69
self .ollama_serve_proc = subprocess .Popen (["ollama" , "serve" ])
74
70
time .sleep (1 )
You can’t perform that action at this time.
0 commit comments