SheriDee commited on
Commit
2f97e76
·
verified ·
1 Parent(s): 9e1925c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -37,5 +37,16 @@ def translate(text):
37
  z_t5 = encoder_t5(t5_emb)
38
  return f"Cosine Similarity: {torch.cosine_similarity(z_bert, z_t5).item():.4f}"
39
 
40
- iface = gr.Interface(fn=translate, inputs="text", outputs="text")
41
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
37
  z_t5 = encoder_t5(t5_emb)
38
  return f"Cosine Similarity: {torch.cosine_similarity(z_bert, z_t5).item():.4f}"
39
 
40
+ # Build Gradio UI
41
+ with gr.Blocks(title="Sheri Dee's Universal Geometry Translator") as demo:
42
+ gr.Markdown("## 🌐 Sheri Dee's Universal Geometry Translator")
43
+ gr.Markdown("*Find the hidden connections between worlds of language.*")
44
+
45
+ with gr.Row():
46
+ text_input = gr.Textbox(label="Enter your text here:")
47
+ output = gr.Textbox(label="Cosine Similarity Score")
48
+
49
+ translate_button = gr.Button("🔍 Analyze")
50
+ translate_button.click(fn=translate, inputs=text_input, outputs=output)
51
+
52
+ demo.launch()