gouravgujariya commited on
Commit
7421b9b
·
verified ·
1 Parent(s): b71b5af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -4,6 +4,7 @@ import pandas as pd
4
  import numpy as np
5
  import pickle
6
  import sklearn
 
7
  from datasets import load_dataset
8
 
9
  data = pd.read_csv("Dataset/mldata.csv")
@@ -75,6 +76,8 @@ def dummy_encode(df):
75
  else:
76
  return "Invalid choice"'''
77
 
 
 
78
  def rfprediction(name, logical_thinking, hackathon_attend, coding_skills, public_speaking_skills,
79
  self_learning, extra_course, certificate_code, worskhop_code, read_writing_skill, memory_capability
80
  ,subject_interest, career_interest, company_intend, senior_elder_advise, book_interest, introvert_extro,
@@ -156,6 +159,14 @@ def rfprediction(name, logical_thinking, hackathon_attend, coding_skills, public
156
  "UX Designer": float(prediction_result_all[0][10]),
157
  "Web Developer": float(prediction_result_all[0][11]),
158
  }
 
 
 
 
 
 
 
 
159
  return result_list
160
 
161
  cert_list = ["app development", "distro making", "full stack", "hadoop", "information security", "machine learning", "python", "r programming", "shell programming"]
@@ -193,6 +204,7 @@ demo =gr.Interface(fn = rfprediction, inputs=[
193
  outputs=gr.Label(num_top_classes=5),
194
  title=" ",
195
  description="Members: ""
 
196
  )
197
 
198
 
 
4
  import numpy as np
5
  import pickle
6
  import sklearn
7
+ import requests
8
  from datasets import load_dataset
9
 
10
  data = pd.read_csv("Dataset/mldata.csv")
 
76
  else:
77
  return "Invalid choice"'''
78
 
79
+ response={}
80
+
81
  def rfprediction(name, logical_thinking, hackathon_attend, coding_skills, public_speaking_skills,
82
  self_learning, extra_course, certificate_code, worskhop_code, read_writing_skill, memory_capability
83
  ,subject_interest, career_interest, company_intend, senior_elder_advise, book_interest, introvert_extro,
 
159
  "UX Designer": float(prediction_result_all[0][10]),
160
  "Web Developer": float(prediction_result_all[0][11]),
161
  }
162
+ job_pre=max(result_list)
163
+ url = "https://jobs-api14.p.rapidapi.com/v2/list"
164
+ querystring = {"query":job_pre,"location":"India","autoTranslateLocation":"false","remoteOnly":"false","employmentTypes":"fulltime;parttime;intern;contractor"}
165
+ headers = {
166
+ "x-rapidapi-key": "714f5a2539msh798d996c3243876p19c71ajsnfcd7ce481cb9",
167
+ "x-rapidapi-host": "jobs-api14.p.rapidapi.com"}
168
+ response = requests.get(url, headers=headers, params=querystring)
169
+ # print(response.json())
170
  return result_list
171
 
172
  cert_list = ["app development", "distro making", "full stack", "hadoop", "information security", "machine learning", "python", "r programming", "shell programming"]
 
204
  outputs=gr.Label(num_top_classes=5),
205
  title=" ",
206
  description="Members: ""
207
+ print(response.json())
208
  )
209
 
210