raannakasturi commited on
Commit
2ce7bcb
·
1 Parent(s): 351d53e

Refactor imports and consolidate utility functions into utils.py; remove tools.py

Browse files
Files changed (4) hide show
  1. app.py +1 -1
  2. arvix.py +0 -4
  3. pmc.py +0 -4
  4. tools.py → utils.py +0 -0
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  from fetch_data import fetch_data
3
- from tools import reset_datafiles
4
 
5
  theme = gr.themes.Soft(
6
  primary_hue="purple",
 
1
  import gradio as gr
2
  from fetch_data import fetch_data
3
+ from utils import reset_datafiles
4
 
5
  theme = gr.themes.Soft(
6
  primary_hue="purple",
arvix.py CHANGED
@@ -1,10 +1,6 @@
1
  import json
2
  import random
3
- import os
4
- import sys
5
  from bs4 import BeautifulSoup
6
-
7
- sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
8
  import utils
9
 
10
  def fetch_new_page(category):
 
1
  import json
2
  import random
 
 
3
  from bs4 import BeautifulSoup
 
 
4
  import utils
5
 
6
  def fetch_new_page(category):
pmc.py CHANGED
@@ -2,11 +2,7 @@ import json
2
  import xml.etree.ElementTree as ET
3
  from bs4 import BeautifulSoup
4
  import requests
5
- import os
6
- import sys
7
  import threading
8
-
9
- sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../")
10
  import utils
11
 
12
  def fetch_links(category):
 
2
  import xml.etree.ElementTree as ET
3
  from bs4 import BeautifulSoup
4
  import requests
 
 
5
  import threading
 
 
6
  import utils
7
 
8
  def fetch_links(category):
tools.py → utils.py RENAMED
File without changes