Spaces:
Configuration error

chat / app.py
yonkasoft's picture
Upload 15 files
681c53e verified
raw
history blame
720 Bytes
from post import send_data_to_dynamodb
from get import get_data_from_dynamodb
import json
import uuid
def get_user_input():
user_data = {
'title': input("Başlığı giriniz: "),
'keywords': input("Anahtar kelimeleri giriniz (virgül ile ayırarak): ")
}
return user_data
def main():
user_data = get_user_input()
item_id = str(uuid.uuid4())
user_data['id'] = item_id
response = send_data_to_dynamodb(user_data)
if response.status_code == 200:
print("Data successfully sent to DynamoDB!")
else:
print(f"Error: {response.status_code}, {response.text}")
if __name__ == '__main__':
main()