Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,16 @@
|
|
| 1 |
import json
|
| 2 |
import requests
|
| 3 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Titolo dell'app
|
| 6 |
st.title("💬 Chat con Ollama")
|
|
|
|
| 1 |
import json
|
| 2 |
import requests
|
| 3 |
import streamlit as st
|
| 4 |
+
import subprocess
|
| 5 |
+
|
| 6 |
+
try:
|
| 7 |
+
result = subprocess.run(["ollama", "--version"], capture_output=True, text=True, check=True)
|
| 8 |
+
print("✅ Ollama è installato:", result.stdout.strip())
|
| 9 |
+
except FileNotFoundError:
|
| 10 |
+
print("❌ Ollama non è installato.")
|
| 11 |
+
except subprocess.CalledProcessError as e:
|
| 12 |
+
print("⚠️ Errore durante il controllo di Ollama:", e)
|
| 13 |
+
|
| 14 |
|
| 15 |
# Titolo dell'app
|
| 16 |
st.title("💬 Chat con Ollama")
|