MeshMax commited on
Commit
9b639e2
·
verified ·
1 Parent(s): 49705d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -126,7 +126,7 @@ def compute_embedding(title, description, tags, thumbnail_url):
126
  # --- NEW: Pure Gradio Interface + Launch (remove FastAPI entirely) ---
127
  def gradio_fn(title, description, tags, thumbnail_url):
128
  emb = compute_embedding(title, description, tags, thumbnail_url)
129
- return f"Embedding length={len(emb)}; first 10: {emb[:10]}\nFull embedding: {emb}"
130
 
131
  # Create the interface (same as before)
132
  demo = gr.Interface( # Renamed from gr_interface for clarity
 
126
  # --- NEW: Pure Gradio Interface + Launch (remove FastAPI entirely) ---
127
  def gradio_fn(title, description, tags, thumbnail_url):
128
  emb = compute_embedding(title, description, tags, thumbnail_url)
129
+ return emb # Returns the full list directly—Gradio stringifies it cleanly
130
 
131
  # Create the interface (same as before)
132
  demo = gr.Interface( # Renamed from gr_interface for clarity