Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,6 @@ import pandas as pd
|
|
| 7 |
from tqdm import tqdm
|
| 8 |
import urllib
|
| 9 |
from bs4 import BeautifulSoup
|
| 10 |
-
from unsloth import FastLanguageModel # Import moved to the top for model loading
|
| 11 |
|
| 12 |
# Configure logging to write messages to a file
|
| 13 |
logging.basicConfig(filename='app.log', level=logging.ERROR)
|
|
@@ -106,6 +105,8 @@ def main(urls):
|
|
| 106 |
return results
|
| 107 |
|
| 108 |
@spaces.GPU()
|
|
|
|
|
|
|
| 109 |
def classify_website(url):
|
| 110 |
global model, tokenizer # Declare model and tokenizer as global variables
|
| 111 |
|
|
|
|
| 7 |
from tqdm import tqdm
|
| 8 |
import urllib
|
| 9 |
from bs4 import BeautifulSoup
|
|
|
|
| 10 |
|
| 11 |
# Configure logging to write messages to a file
|
| 12 |
logging.basicConfig(filename='app.log', level=logging.ERROR)
|
|
|
|
| 105 |
return results
|
| 106 |
|
| 107 |
@spaces.GPU()
|
| 108 |
+
from unsloth import FastLanguageModel # Import moved to the top for model loading
|
| 109 |
+
|
| 110 |
def classify_website(url):
|
| 111 |
global model, tokenizer # Declare model and tokenizer as global variables
|
| 112 |
|