-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathData.py
51 lines (40 loc) · 1.11 KB
/
Data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import openai
import requests
import sys
import json
from googletrans import Translator
from google.cloud import language_v1
from google.oauth2 import service_account
from collections import Counter
from datetime import datetime
import time
import requests
from flask import Flask, request,jsonify
from multiprocessing import Process
from konlpy.tag import Okt
import numpy as np
import threading
import time
# 대화 기록을 저장할 리스트
conversation = [
{"role": "user", "content": "어린아이말투로 친절하게 친구처럼 대화해주고 답변은 짧게 말해줘.","date":" ","username":""}
]
# 감정 분석을 저장할 리스트
analyze_data =[
{"content":"" ,"negative":"" ,"positive":"" ,"neutral":"" ,"date":" ","username":""}
]
key_word =[
{"keyword":"" , "count":"","date":"","username":""}
]
Category =[
{"category":"" , "confidence":"" , "date":"","username":""}
]
IdArray =[
]
def Add_Id(new_id):
if new_id not in IdArray:
IdArray.append(new_id)
def list_all_ids():
print("현재 저장된 ID들:")
for id in IdArray:
print(id)