Spaces:
Sleeping
Sleeping
Upload llm_app.py
Browse files- llm_app.py +6 -2
llm_app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
|
|
|
| 3 |
from pathlib import Path
|
| 4 |
import fitz # PyMuPDF
|
| 5 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
|
@@ -14,6 +15,9 @@ import re
|
|
| 14 |
import random
|
| 15 |
from dotenv import load_dotenv
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
# Load environment variables from .env file
|
| 18 |
load_dotenv()
|
| 19 |
|
|
@@ -525,7 +529,7 @@ with gr.Blocks(title="LLM Curriculum Assistant", theme=gr.themes.Soft()) as demo
|
|
| 525 |
label="Code Editor",
|
| 526 |
language="python",
|
| 527 |
lines=10,
|
| 528 |
-
|
| 529 |
)
|
| 530 |
|
| 531 |
# Right Column - Student Work & Analysis
|
|
@@ -536,7 +540,7 @@ with gr.Blocks(title="LLM Curriculum Assistant", theme=gr.themes.Soft()) as demo
|
|
| 536 |
label="Your Code",
|
| 537 |
language="python",
|
| 538 |
lines=15,
|
| 539 |
-
|
| 540 |
)
|
| 541 |
|
| 542 |
analyze_btn = gr.Button("🔍 Analyze My Code", variant="secondary", size="lg")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
+
import warnings
|
| 4 |
from pathlib import Path
|
| 5 |
import fitz # PyMuPDF
|
| 6 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
|
|
|
| 15 |
import random
|
| 16 |
from dotenv import load_dotenv
|
| 17 |
|
| 18 |
+
# Suppress deprecation warnings
|
| 19 |
+
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
| 20 |
+
|
| 21 |
# Load environment variables from .env file
|
| 22 |
load_dotenv()
|
| 23 |
|
|
|
|
| 529 |
label="Code Editor",
|
| 530 |
language="python",
|
| 531 |
lines=10,
|
| 532 |
+
value="# Write your code here..."
|
| 533 |
)
|
| 534 |
|
| 535 |
# Right Column - Student Work & Analysis
|
|
|
|
| 540 |
label="Your Code",
|
| 541 |
language="python",
|
| 542 |
lines=15,
|
| 543 |
+
value="# Write your solution here..."
|
| 544 |
)
|
| 545 |
|
| 546 |
analyze_btn = gr.Button("🔍 Analyze My Code", variant="secondary", size="lg")
|