Merge branch 'main' of github.com:Qumo-io/Interview-Analysis
This commit is contained in:
@@ -11,7 +11,10 @@ def _():
|
||||
import ollama
|
||||
from ollama import Client
|
||||
|
||||
QUMO_OLLAMA_URL = 'http://hiperf-gpu.tail44fa00.ts.net:11434'
|
||||
VM_NAME = 'hiperf-gpu'
|
||||
#VM_NAME = 'ollama-vb'
|
||||
|
||||
QUMO_OLLAMA_URL = f'http://{VM_NAME}.tail44fa00.ts.net:11434'
|
||||
return Client, QUMO_OLLAMA_URL, mo, requests
|
||||
|
||||
|
||||
|
||||
@@ -7,16 +7,26 @@ app = marimo.App(width="medium")
|
||||
@app.cell
|
||||
def _():
|
||||
import marimo as mo
|
||||
return (mo,)
|
||||
import requests
|
||||
import ollama
|
||||
from ollama import Client
|
||||
|
||||
VM_NAME = 'hiperf-gpu'
|
||||
#VM_NAME = 'ollama-vb'
|
||||
|
||||
QUMO_OLLAMA_URL = f'http://{VM_NAME}.tail44fa00.ts.net:11434'
|
||||
return Client, QUMO_OLLAMA_URL, VM_NAME, mo, requests
|
||||
|
||||
|
||||
@app.cell
|
||||
def _():
|
||||
import ollama
|
||||
from ollama import Client
|
||||
def _(Client, QUMO_OLLAMA_URL, requests):
|
||||
try:
|
||||
requests.get(QUMO_OLLAMA_URL, timeout=5)
|
||||
client = Client(
|
||||
host='http://ollama-vb.tail44fa00.ts.net:11434'
|
||||
host=QUMO_OLLAMA_URL
|
||||
)
|
||||
except requests.ConnectionError:
|
||||
print(f"Failed to reach {QUMO_OLLAMA_URL}. Check that the VM is running and Tailscale is up")
|
||||
return (client,)
|
||||
|
||||
|
||||
@@ -27,11 +37,11 @@ def _():
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
def _(VM_NAME, mo):
|
||||
mo.md(rf"""
|
||||
# Ollama Reference
|
||||
|
||||
## Ollama Web-UI: http://ollama-vb.tail44fa00.ts.net:3000
|
||||
## Ollama Web-UI: http://{VM_NAME}.tail44fa00.ts.net:3000
|
||||
Use the UI to modify system prompts, custom models, etc...
|
||||
|
||||
**if the connection fails, make sure Tailscale is up**
|
||||
@@ -72,7 +82,7 @@ def _(mo):
|
||||
|
||||
@app.cell
|
||||
def _(client):
|
||||
response_chat = client.chat(model='deepseek-r1:7b', messages=[
|
||||
response_chat = client.chat(model='deepseek-r1:32b', messages=[
|
||||
{
|
||||
'role': 'user',
|
||||
'content': 'Why is the sky blue?',
|
||||
|
||||
Reference in New Issue
Block a user