Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,10 +13,10 @@ api_key = os.getenv("OPENAI_API_KEY") # Ensure your OpenAI API key is stored in
|
|
| 13 |
client = OpenAI(api_key=api_key)
|
| 14 |
|
| 15 |
# Define the paragraph as a global variable
|
| 16 |
-
paragraph = (
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
# Function to generate embeddings
|
| 22 |
def get_embeddings(text):
|
|
|
|
| 13 |
client = OpenAI(api_key=api_key)
|
| 14 |
|
| 15 |
# Define the paragraph as a global variable
|
| 16 |
+
paragraph = """Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think and learn like humans. AI systems can perform tasks such as recognizing speech, understanding natural language, making decisions, and identifying patterns. These systems are powered by algorithms and vast amounts of data, enabling them to improve their performance over time. AI has a wide range of applications, including autonomous vehicles, medical diagnostics, customer service, and more. As AI continues to evolve, it holds the potential to revolutionize industries and change the way humans interact with technology.
|
| 17 |
+
|
| 18 |
+
Machine Learning (ML) is a subset of Artificial Intelligence that focuses on the development of algorithms that allow computers to learn from and make predictions or decisions based on data. Unlike traditional programming, where a developer explicitly tells the computer how to perform tasks, ML algorithms improve their performance by analyzing patterns and making adjustments without human intervention. ML is widely used in applications such as recommendation systems, fraud detection, image recognition, and natural language processing. The field continues to grow rapidly, driven by advancements in computational power, data availability, and algorithmic improvements."""
|
| 19 |
+
|
| 20 |
|
| 21 |
# Function to generate embeddings
|
| 22 |
def get_embeddings(text):
|