wakeupmh commited on
Commit
0943c16
·
1 Parent(s): 3475cd4

fix: local model

Browse files
Files changed (1) hide show
  1. services/model_handler.py +2 -4
services/model_handler.py CHANGED
@@ -4,15 +4,13 @@ import streamlit as st
4
  from agno.agent import Agent
5
  from agno.tools.arxiv import ArxivTools
6
  from agno.tools.pubmed import PubmedTools
7
- from agno.models.base import BaseModel
8
- import os
9
- import time
10
  from tenacity import retry, stop_after_attempt, wait_exponential
11
 
12
  MODEL_PATH = "google/flan-t5-small"
13
 
14
  # Personnalized class for local models
15
- class LocalHuggingFaceModel(BaseModel):
16
  def __init__(self, model, tokenizer, max_length=512):
17
  super().__init__()
18
  self.model = model
 
4
  from agno.agent import Agent
5
  from agno.tools.arxiv import ArxivTools
6
  from agno.tools.pubmed import PubmedTools
7
+ from agno.models.base import Model
 
 
8
  from tenacity import retry, stop_after_attempt, wait_exponential
9
 
10
  MODEL_PATH = "google/flan-t5-small"
11
 
12
  # Personnalized class for local models
13
+ class LocalHuggingFaceModel(Model):
14
  def __init__(self, model, tokenizer, max_length=512):
15
  super().__init__()
16
  self.model = model