I will provide Code Snippets here for everyone to keep up the pace 😉
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import tempfile | |
import cv2 | |
import numpy as np | |
from fastapi import FastAPI, UploadFile, File, HTTPException | |
from tensorflow.keras.models import load_model | |
app = FastAPI(title="DeepTruth Deepfake Detector") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def translate(text): | |
API_TOKEN = "PUT_YOUR_HUGGINGFACE_API_TOKEN_HERE" | |
API_URL = "https://api-inference.huggingface.co/models/Helsinki-NLP/opus-mt-en-tl" | |
response = requests.post( | |
API_URL, | |
headers={"Authorization": f"Bearer {API_TOKEN}"}, | |
json={"inputs": text} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Hello World!</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.app { | |
display: flex; | |
height: 100vh; | |
width: 100vw; | |
background-color: #e9ecef; | |
} | |
.no-note-selected { | |
height: 100%; | |
width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>To-Do List App</title> | |
<link href="styles.css" rel="stylesheet" /> | |
<link | |
rel="stylesheet" | |
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" |