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 React from 'react'; | |
import styles from '../styles/Home.module.css'; | |
const IMAGE_COUNT = 10; | |
const IMAGE_SIZE = 1024; | |
export default function Home() { | |
const [value, setValue] = React.useState<string>(''); | |
const [fileName, setFileName] = React.useState<string>(''); | |
const [imageIndex, setImageIndex] = React.useState<number>(0); |
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 type { NextApiRequest, NextApiResponse } from 'next' | |
import { Configuration, OpenAIApi, ImagesResponseDataInner } from 'openai'; | |
const configuration = new Configuration({ | |
apiKey: process.env.OPENAI_API_KEY, | |
}); | |
const openai = new OpenAIApi(configuration); | |
type Data = { | |
result: ImagesResponseDataInner[], |
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
.main { | |
display: flex; | |
flex-direction: column; | |
justify-content: space-between; | |
align-items: center; | |
padding: 2rem; | |
} | |
.main iframe { | |
border: none; |
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 React from 'react'; | |
import styles from '../styles/Home.module.css'; | |
const IMAGE_COUNT = 10; | |
const IMAGE_SIZE = 1024; | |
export default function Home() { | |
const [value, setValue] = React.useState<string>(''); | |
const [prompt, setPrompt] = React.useState<string>(''); | |
const [imageIndex, setImageIndex] = React.useState<number>(0); |
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 './App.css'; | |
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
import HighchartsExporting from 'highcharts/modules/exporting'; | |
import HighchartsAccessibility from 'highcharts/modules/accessibility'; | |
import HighchartsParallelCoordinates from 'highcharts/modules/parallel-coordinates'; | |
HighchartsExporting(Highcharts); | |
HighchartsAccessibility(Highcharts); | |
HighchartsParallelCoordinates(Highcharts); |
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 './App.css'; | |
import { useRef } from 'react'; | |
import useInterval from '@use-it/interval'; | |
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
import HighchartsExporting from 'highcharts/modules/exporting'; | |
import HighchartsAccessibility from 'highcharts/modules/accessibility'; | |
import HighchartsParallelCoordinates from 'highcharts/modules/parallel-coordinates'; | |
HighchartsExporting(Highcharts); | |
HighchartsAccessibility(Highcharts); |
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 './App.css'; | |
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
import HighchartsExporting from 'highcharts/modules/exporting'; | |
import HighchartsAccessibility from 'highcharts/modules/accessibility'; | |
import HighchartsParallelCoordinates from 'highcharts/modules/parallel-coordinates'; | |
HighchartsExporting(Highcharts); | |
HighchartsAccessibility(Highcharts); | |
HighchartsParallelCoordinates(Highcharts); |
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 './App.css'; | |
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
import HighchartsExporting from 'highcharts/modules/exporting'; | |
import HighchartsAccessibility from 'highcharts/modules/accessibility'; | |
import HighchartsParallelCoordinates from 'highcharts/modules/parallel-coordinates'; | |
HighchartsExporting(Highcharts); | |
HighchartsAccessibility(Highcharts); | |
HighchartsParallelCoordinates(Highcharts); |
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 './App.css'; | |
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
import HighchartsExporting from 'highcharts/modules/exporting'; | |
import HighchartsAccessibility from 'highcharts/modules/accessibility'; | |
import HighchartsParallelCoordinates from 'highcharts/modules/parallel-coordinates'; | |
HighchartsExporting(Highcharts); | |
HighchartsAccessibility(Highcharts); | |
HighchartsParallelCoordinates(Highcharts); |
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 './App.css'; | |
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
import HighchartsExporting from 'highcharts/modules/exporting'; | |
import HighchartsAccessibility from 'highcharts/modules/accessibility'; | |
import HighchartsParallelCoordinates from 'highcharts/modules/parallel-coordinates'; | |
HighchartsExporting(Highcharts); | |
HighchartsAccessibility(Highcharts); | |
HighchartsParallelCoordinates(Highcharts); |