Skip to content

Commit

Permalink
add init replicate and analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
alstat committed Aug 5, 2023
1 parent bd28abb commit bebef1c
Show file tree
Hide file tree
Showing 4 changed files with 210 additions and 2 deletions.
189 changes: 188 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
},
"type": "module",
"dependencies": {
"@vercel/analytics": "^1.0.1",
"dotenv": "^16.3.1",
"lucide-svelte": "^0.263.0",
"open-props": "^1.5.10"
"open-props": "^1.5.10",
"replicate": "^0.14.1"
}
}
14 changes: 14 additions & 0 deletions src/lib/data/replicate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Replicate from "replicate";

const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});

const output = await replicate.run(
"lucataco/animate-diff:1531004ee4c98894ab11f8a4ce6206099e732c1da15121987a8eef54828f0663",
{
input: {
motion_module: "mm_sd_v14"
}
}
);
4 changes: 4 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import Header from './Header.svelte';
import Footer from './Footer.svelte';
import '$lib/styles.css';
import { dev } from '$app/environment';
import { inject } from '@vercel/analytics';
inject({ mode: dev ? 'development' : 'production' });
</script>

<div class="app">
Expand Down

0 comments on commit bebef1c

Please sign in to comment.