File size: 823 Bytes
3ebfa24
 
 
 
 
c2b065f
 
 
 
 
 
 
 
 
00dee95
c2b065f
 
1e3e4e6
 
3ebfa24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
import getpass
from dotenv import load_dotenv
load_dotenv()

import subprocess

def write_nameserver_to_resolv_conf(nameserver):
  """Writes the specified nameserver to the /etc/resolv.conf file.

  Args:
    nameserver: The nameserver to write, e.g., "8.8.8.8".
  """

  command = f"sudo echo 'nameserver {nameserver}' > /etc/resolv.conf"
  subprocess.run(command, shell=True, check=True)

write_nameserver_to_resolv_conf("8.8.8.8")
write_nameserver_to_resolv_conf("8.8.4.4")

import telegram

import prompts

INTERFACE='TELEGRAM'
MODEL='LLAMA'
REPO_ID='meta-llama/Llama-3.2-1B-Instruct'
#REPO_ID='meta-llama/Llama-3.2-90B-Vision-Instruct'







if INTERFACE=='TELEGRAM':
    telegram.init_telegram(model=MODEL,repo_id=REPO_ID)
    telegram_bot=telegram.get_telegram_bot()
    telegram_bot.infinity_polling()