PlantBasedTen commited on
Commit
a863d90
1 Parent(s): ded8d17

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +7 -7
  2. bot.py +1 -27
app.py CHANGED
@@ -118,7 +118,7 @@ def load_bot(
118
 
119
 
120
  bot = load_bot(
121
- # env_file_path=args.env_file_path,
122
  logging_config_path=args.logging_config_path,
123
  model_cache_dir=args.model_cache_dir,
124
  embedding_model_device=args.embedding_model_device,
@@ -166,12 +166,12 @@ demo = gr.ChatInterface.load(
166
  container=False,
167
  scale=7,
168
  ),
169
- # additional_inputs=[
170
- # gr.Textbox(
171
- # "I am a student and I have some money that I want to invest.",
172
- # label="About me",
173
- # )
174
- # ],
175
  title="Your Personal Financial Assistant",
176
  description="Ask me any financial or crypto market questions, and I will do my best to answer them.",
177
  theme="soft",
 
118
 
119
 
120
  bot = load_bot(
121
+ env_file_path=args.env_file_path,
122
  logging_config_path=args.logging_config_path,
123
  model_cache_dir=args.model_cache_dir,
124
  embedding_model_device=args.embedding_model_device,
 
166
  container=False,
167
  scale=7,
168
  ),
169
+ additional_inputs=[
170
+ gr.Textbox(
171
+ "I am a student and I have some money that I want to invest.",
172
+ label="About me",
173
+ )
174
+ ],
175
  title="Your Personal Financial Assistant",
176
  description="Ask me any financial or crypto market questions, and I will do my best to answer them.",
177
  theme="soft",
bot.py CHANGED
@@ -16,7 +16,7 @@ open_api_key = os.getenv("QDRANT_API_KEY")
16
 
17
 
18
  def load_bot(
19
- # env_file_path: str = ".env",
20
  logging_config_path: str = "logging.yaml",
21
  model_cache_dir: str = "/model_cache",
22
  embedding_model_device: str = "cuda:0",
@@ -61,32 +61,6 @@ def load_bot(
61
  return bot
62
 
63
 
64
- def load_bot_dev(
65
- env_file_path: str = ".env",
66
- logging_config_path: str = "logging.yaml",
67
- model_cache_dir: str = "./model_cache",
68
- ):
69
- """
70
- Load the Financial Assistant Bot in dev mode: the embedding model runs on CPU and the LLM is mocked.
71
-
72
- Args:
73
- env_file_path (str): Path to the environment file.
74
- logging_config_path (str): Path to the logging configuration file.
75
- model_cache_dir (str): Path to the directory where the model cache is stored.
76
-
77
- Returns:
78
- The loaded Financial Assistant Bot in dev mode.
79
- """
80
-
81
- return load_bot(
82
- env_file_path=env_file_path,
83
- logging_config_path=logging_config_path,
84
- model_cache_dir=model_cache_dir,
85
- embedding_model_device="cpu",
86
- debug=True,
87
- )
88
-
89
-
90
  # === Bot Runners ===
91
 
92
 
 
16
 
17
 
18
  def load_bot(
19
+ env_file_path: str = ".env",
20
  logging_config_path: str = "logging.yaml",
21
  model_cache_dir: str = "/model_cache",
22
  embedding_model_device: str = "cuda:0",
 
61
  return bot
62
 
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  # === Bot Runners ===
65
 
66