Spaces:
Running
Running
Add 2 files
Browse files- index.html +45 -6
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -265,7 +265,7 @@
|
|
| 265 |
"history1.txt": "THE LOST CITY OF ATLANTIS\n\nWhile Plato's account of Atlantis was long considered allegorical, recent underwater archaeological discoveries suggest there may be truth to the ancient tale. Marine surveys off the coast of Spain have revealed structures that match Plato's descriptions with uncanny accuracy, dating to the exact time period he mentioned...",
|
| 266 |
"history2.txt": "DECODING THE ENIGMA\n\nThe breaking of the German Enigma code by Allied cryptanalysts during World War II was one of the most significant intelligence victories in history. This breakthrough, largely credited to Alan Turing and his team at Bletchley Park, is estimated to have shortened the war by two years and saved countless lives...",
|
| 267 |
"tech1.txt": "ARTIFICIAL INTELLIGENCE: BEYOND THE HYPE\n\nWhile AI has dominated tech headlines, the real revolution is happening behind the scenes. From drug discovery to climate modeling, machine learning algorithms are solving problems that were previously intractable. The next decade will see AI move from narrow applications to more general intelligence, fundamentally changing how we interact with technology...",
|
| 268 |
-
"tech2.txt": "BLOCKCHAIN'S SECOND
|
| 269 |
"health1.txt": "THE MICROBIOME REVOLUTION\n\nResearch into the human microbiome - the trillions of bacteria living in and on our bodies - is transforming our understanding of health. These microbial communities influence everything from digestion to mental health, and personalized microbiome therapies may soon become standard medical practice...",
|
| 270 |
"health2.txt": "MINDFULNESS IN THE DIGITAL AGE\n\nAs screen time increases and attention spans decrease, neuroscientists are documenting the benefits of mindfulness practices. Regular meditation has been shown to reduce stress, improve focus, and even increase gray matter density in brain regions associated with memory and emotional regulation...",
|
| 271 |
"business1.txt": "2023 MARKET OUTLOOK\n\nDespite economic headwinds, several sectors show strong growth potential. Renewable energy, cybersecurity, and healthcare technology are expected to outperform, while traditional retail and commercial real estate face continued challenges. Investors should focus on companies with strong cash flows and adaptable business models...",
|
|
@@ -477,7 +477,36 @@
|
|
| 477 |
function loadGeneratedContent() {
|
| 478 |
if (!generatedTextContent) return;
|
| 479 |
|
| 480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 481 |
showTeleprompterView();
|
| 482 |
}
|
| 483 |
|
|
@@ -491,8 +520,16 @@
|
|
| 491 |
|
| 492 |
// Simulate API call with timeout
|
| 493 |
promptInput.disabled = true;
|
| 494 |
-
|
| 495 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 496 |
|
| 497 |
// In a real app, this would call the Deepseek API
|
| 498 |
setTimeout(() => {
|
|
@@ -508,13 +545,15 @@
|
|
| 508 |
response = `${prompt.toUpperCase()}\n\nThis is a simulated response to your prompt about "${prompt}". In a real implementation, this content would be generated by the Deepseek API based on your specific request.\n\nThe generated text would typically include several paragraphs of relevant, coherent content that addresses the topic you requested. The quality and depth of the response would depend on the specificity of your prompt and the capabilities of the AI model.\n\nFor demonstration purposes, this is placeholder text that shows where the actual generated content would appear. The real implementation would connect to the API endpoint you provide to fetch dynamic, AI-generated responses.`;
|
| 509 |
}
|
| 510 |
|
| 511 |
-
//
|
| 512 |
-
generatedText.innerHTML = response.replace(/\n\n/g, '<br><br>');
|
| 513 |
generatedTextContent = response;
|
| 514 |
|
| 515 |
// Create audio (simulated - in real app would use TTS API)
|
| 516 |
createAudioFromText(response);
|
| 517 |
|
|
|
|
|
|
|
|
|
|
| 518 |
promptInput.disabled = false;
|
| 519 |
}, 2000);
|
| 520 |
}
|
|
|
|
| 265 |
"history1.txt": "THE LOST CITY OF ATLANTIS\n\nWhile Plato's account of Atlantis was long considered allegorical, recent underwater archaeological discoveries suggest there may be truth to the ancient tale. Marine surveys off the coast of Spain have revealed structures that match Plato's descriptions with uncanny accuracy, dating to the exact time period he mentioned...",
|
| 266 |
"history2.txt": "DECODING THE ENIGMA\n\nThe breaking of the German Enigma code by Allied cryptanalysts during World War II was one of the most significant intelligence victories in history. This breakthrough, largely credited to Alan Turing and his team at Bletchley Park, is estimated to have shortened the war by two years and saved countless lives...",
|
| 267 |
"tech1.txt": "ARTIFICIAL INTELLIGENCE: BEYOND THE HYPE\n\nWhile AI has dominated tech headlines, the real revolution is happening behind the scenes. From drug discovery to climate modeling, machine learning algorithms are solving problems that were previously intractable. The next decade will see AI move from narrow applications to more general intelligence, fundamentally changing how we interact with technology...",
|
| 268 |
+
"tech2.txt": "BLOCKCHAIN'S SECOND Act\n\nAfter the cryptocurrency boom and bust, blockchain technology is finding its true calling in supply chain management, digital identity, and secure voting systems. The key innovation isn't decentralization but the creation of tamper-proof, transparent records that multiple parties can trust without a central authority...",
|
| 269 |
"health1.txt": "THE MICROBIOME REVOLUTION\n\nResearch into the human microbiome - the trillions of bacteria living in and on our bodies - is transforming our understanding of health. These microbial communities influence everything from digestion to mental health, and personalized microbiome therapies may soon become standard medical practice...",
|
| 270 |
"health2.txt": "MINDFULNESS IN THE DIGITAL AGE\n\nAs screen time increases and attention spans decrease, neuroscientists are documenting the benefits of mindfulness practices. Regular meditation has been shown to reduce stress, improve focus, and even increase gray matter density in brain regions associated with memory and emotional regulation...",
|
| 271 |
"business1.txt": "2023 MARKET OUTLOOK\n\nDespite economic headwinds, several sectors show strong growth potential. Renewable energy, cybersecurity, and healthcare technology are expected to outperform, while traditional retail and commercial real estate face continued challenges. Investors should focus on companies with strong cash flows and adaptable business models...",
|
|
|
|
| 477 |
function loadGeneratedContent() {
|
| 478 |
if (!generatedTextContent) return;
|
| 479 |
|
| 480 |
+
// Format the generated content for teleprompter display
|
| 481 |
+
function formatTextToLines(text) {
|
| 482 |
+
const words = text.split(/\s+/);
|
| 483 |
+
const lines = [];
|
| 484 |
+
|
| 485 |
+
for (let i = 0; i < words.length; i += 5) {
|
| 486 |
+
const lineWords = words.slice(i, i + 5);
|
| 487 |
+
lines.push(lineWords);
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
return lines;
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
let formattedContent = `<div class="text-center text-4xl font-bold mb-8 text-purple-400">Generated Content</div>`;
|
| 494 |
+
const paragraphs = generatedTextContent.split('\n\n');
|
| 495 |
+
|
| 496 |
+
paragraphs.forEach(paragraph => {
|
| 497 |
+
const lines = formatTextToLines(paragraph);
|
| 498 |
+
lines.forEach(lineWords => {
|
| 499 |
+
formattedContent += '<div class="word-line">';
|
| 500 |
+
lineWords.forEach(word => {
|
| 501 |
+
formattedContent += `<span class="word">${word}</span>`;
|
| 502 |
+
});
|
| 503 |
+
formattedContent += '</div>';
|
| 504 |
+
});
|
| 505 |
+
// Add extra space between paragraphs
|
| 506 |
+
formattedContent += '<div class="h-12"></div>';
|
| 507 |
+
});
|
| 508 |
+
|
| 509 |
+
teleprompterText.innerHTML = formattedContent;
|
| 510 |
showTeleprompterView();
|
| 511 |
}
|
| 512 |
|
|
|
|
| 520 |
|
| 521 |
// Simulate API call with timeout
|
| 522 |
promptInput.disabled = true;
|
| 523 |
+
|
| 524 |
+
// Show loading state in teleprompter view
|
| 525 |
+
teleprompterText.innerHTML = `
|
| 526 |
+
<div class="text-center py-20">
|
| 527 |
+
<i class="fas fa-spinner fa-spin text-5xl text-purple-400 mb-4"></i>
|
| 528 |
+
<p class="text-2xl">Generating content...</p>
|
| 529 |
+
</div>
|
| 530 |
+
`;
|
| 531 |
+
|
| 532 |
+
showTeleprompterView();
|
| 533 |
|
| 534 |
// In a real app, this would call the Deepseek API
|
| 535 |
setTimeout(() => {
|
|
|
|
| 545 |
response = `${prompt.toUpperCase()}\n\nThis is a simulated response to your prompt about "${prompt}". In a real implementation, this content would be generated by the Deepseek API based on your specific request.\n\nThe generated text would typically include several paragraphs of relevant, coherent content that addresses the topic you requested. The quality and depth of the response would depend on the specificity of your prompt and the capabilities of the AI model.\n\nFor demonstration purposes, this is placeholder text that shows where the actual generated content would appear. The real implementation would connect to the API endpoint you provide to fetch dynamic, AI-generated responses.`;
|
| 546 |
}
|
| 547 |
|
| 548 |
+
// Store the generated content
|
|
|
|
| 549 |
generatedTextContent = response;
|
| 550 |
|
| 551 |
// Create audio (simulated - in real app would use TTS API)
|
| 552 |
createAudioFromText(response);
|
| 553 |
|
| 554 |
+
// Format the content for teleprompter display
|
| 555 |
+
loadGeneratedContent();
|
| 556 |
+
|
| 557 |
promptInput.disabled = false;
|
| 558 |
}, 2000);
|
| 559 |
}
|
prompts.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
add listen to the text ,add this (when i enter the website it will show 3 choices , read book , read article,generate text) the text and audio of book and article it should be in the project folder , the text as .txt , when i choose read book ,it will show a list of book categories and when i choose a categorie it will show a list of books of that categorie , the same with read article , and when i choose generate text it will show a text field where the user can write a prompt like " create an article about cyber security" and it will generate the text using the deepseek api thatr i will procvide later and generate an audio of the text generated so when i click on listen it will start , and add back button to return to the previous page except the main page , the book and article card container should contain an image and a title
|
|
|
|
|
|
| 1 |
+
add listen to the text ,add this (when i enter the website it will show 3 choices , read book , read article,generate text) the text and audio of book and article it should be in the project folder , the text as .txt , when i choose read book ,it will show a list of book categories and when i choose a categorie it will show a list of books of that categorie , the same with read article , and when i choose generate text it will show a text field where the user can write a prompt like " create an article about cyber security" and it will generate the text using the deepseek api thatr i will procvide later and generate an audio of the text generated so when i click on listen it will start , and add back button to return to the previous page except the main page , the book and article card container should contain an image and a title
|
| 2 |
+
in the genrate using ai , when i click on genrate it should not show the Generated Content it should move directly to the Load to Teleprompter and show the Generated Content
|