EnzoBustos commited on
Commit
f33f00f
1 Parent(s): c763c40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -33,7 +33,7 @@ def sentiment_vader(text):
33
  return overall_sentiment.upper()
34
 
35
  def classify_by_company(text):
36
- path = r"Companies"
37
 
38
  for filename in os.listdir(path):
39
  with open(path + '\\' + filename, 'r') as f:
@@ -111,7 +111,14 @@ def load_models(parameters_list):
111
 
112
  return out_translation, out_sentiment, out_classification
113
 
114
- df = pd.read_csv(f"Data\Hugging Face_DF.csv")
 
 
 
 
 
 
 
115
 
116
  header = st.container()
117
  model = st.container()
@@ -162,4 +169,4 @@ with analysis:
162
  st.header("Visualização dos dados utilizados através de WordClouds")
163
 
164
  with analysis_1:
165
- pass
 
33
  return overall_sentiment.upper()
34
 
35
  def classify_by_company(text):
36
+ path = os.path.dirname(os.path.realpath(__file__)) + "\\Companies"
37
 
38
  for filename in os.listdir(path):
39
  with open(path + '\\' + filename, 'r') as f:
 
111
 
112
  return out_translation, out_sentiment, out_classification
113
 
114
+ datapath = os.path.dirname(os.path.realpath(__file__)) + "\\Data\\Hugging Face_DF.csv"
115
+
116
+ meh = '''
117
+ sheet_id = "1pg13sroB-pIEXtIL5UrRowKdXWRPWnH7"
118
+ sheet_name = "Sheet1"
119
+ url = f"https://docs.google.com/spreadsheets/d/{sheet_id}/gviz/tq?tqx=out:csv&sheet={sheet_name}"
120
+ '''
121
+ df = pd.read_csv(datapath)
122
 
123
  header = st.container()
124
  model = st.container()
 
169
  st.header("Visualização dos dados utilizados através de WordClouds")
170
 
171
  with analysis_1:
172
+ pass