ypDarsh commited on
Commit
85c252e
·
verified ·
1 Parent(s): 0097ec5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,8 +1,8 @@
1
- import pandas as pd
2
-
3
- df = pd.read_csv("hf://datasets/sathya0901/twitter_sentimental_analysis/twitter.csv")
4
-
5
- print(df.head())
6
-
7
 
8
  print("hello dj 2")
 
1
+ import requests
2
+ API_URL = "https://api-inference.huggingface.co/models/Dmyadav2001/Sentimental-Analysis"
3
+ headers = {"Authorization": f'Bearer ${access_token}'}
4
+ payload = { "inputs": "He will kill you", }
5
+ response = requests.post(API_URL, headers=headers, json=payload)
6
+ print(response.json())
7
 
8
  print("hello dj 2")