Mahrukhh commited on
Commit
e6cefcf
Β·
verified Β·
1 Parent(s): f213ed5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -5,7 +5,7 @@ import requests
5
  from PIL import Image
6
  from io import BytesIO
7
 
8
- # πŸ” Groq API Key (Set via environment variable or manually for testing)
9
  GROQ_API_KEY = os.getenv("GROQ_API_KEY") or "PASTE_YOUR_GROQ_API_KEY_HERE"
10
 
11
  # βœ… Groq model info
@@ -74,7 +74,7 @@ def reset_history():
74
  history = []
75
  return "", ""
76
 
77
- # 🌟 Gradio GUI with styling and layout
78
  with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container { max-width: 950px; margin: auto; }") as demo:
79
  gr.Markdown("## πŸ—οΈ Construction Damage Identifier Chatbot")
80
  gr.Markdown(
@@ -84,10 +84,10 @@ with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container { max-width: 950px
84
 
85
  with gr.Row():
86
  with gr.Column(scale=1):
87
- img_input = gr.Image(
88
- type="pil", label="πŸ–ΌοΈ Upload Image of Damage", height=300
89
- )
90
-
91
  )
92
  prompt_input = gr.Textbox(
93
  lines=3,
 
5
  from PIL import Image
6
  from io import BytesIO
7
 
8
+ # πŸ” Groq API Key (Set via environment variable or paste manually for local testing)
9
  GROQ_API_KEY = os.getenv("GROQ_API_KEY") or "PASTE_YOUR_GROQ_API_KEY_HERE"
10
 
11
  # βœ… Groq model info
 
74
  history = []
75
  return "", ""
76
 
77
+ # 🌟 Gradio GUI
78
  with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container { max-width: 950px; margin: auto; }") as demo:
79
  gr.Markdown("## πŸ—οΈ Construction Damage Identifier Chatbot")
80
  gr.Markdown(
 
84
 
85
  with gr.Row():
86
  with gr.Column(scale=1):
87
+ img_input = gr.Image(
88
+ type="pil",
89
+ label="πŸ–ΌοΈ Upload Image of Damage",
90
+ height=300
91
  )
92
  prompt_input = gr.Textbox(
93
  lines=3,