From 85027d3e3a1d35e4f5efc4fa65e89729358ae925 Mon Sep 17 00:00:00 2001 From: Joris Kalz Date: Wed, 20 Dec 2023 21:46:19 +0100 Subject: [PATCH 01/11] Added Persona from Text --- src/apps/personas/YTPersonaCreator.tsx | 84 ++++++++++++++++---------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/src/apps/personas/YTPersonaCreator.tsx b/src/apps/personas/YTPersonaCreator.tsx index 272906df3..90d5ab32a 100644 --- a/src/apps/personas/YTPersonaCreator.tsx +++ b/src/apps/personas/YTPersonaCreator.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { Alert, Box, Button, Card, CardContent, CircularProgress, Grid, IconButton, Input, LinearProgress, Tooltip, Typography } from '@mui/joy'; +import { Alert, Box, Button, Card, CardContent, CircularProgress, Grid, IconButton, Input, LinearProgress, Tooltip, Typography, Tabs, TabList, Tab, TabPanel } from '@mui/joy'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import WhatshotIcon from '@mui/icons-material/Whatshot'; import YouTubeIcon from '@mui/icons-material/YouTube'; @@ -67,6 +67,7 @@ export function YTPersonaCreator() { const [videoURL, setVideoURL] = React.useState(''); const [videoID, setVideoID] = React.useState(''); const [personaTranscript, setPersonaTranscript] = React.useState(null); + const [personaText, setPersonaText] = React.useState(''); // external state const [diagramLlm, llmComponent] = useFormRadioLlmType(); @@ -93,41 +94,60 @@ export function YTPersonaCreator() { } }; + // New handler for persona text change + const handlePersonaTextChange = (e: React.ChangeEvent) => { + setPersonaText(e.target.value); + }; + return <> - - - - YouTube -> AI persona - - - -
- - setVideoURL('https://www.youtube.com/watch?v=M_wZpSEvOkc')} - > - - - } - /> - + +
+ + + {/* New text area for users to paste copied text */} + + Paste your text here + +