Spaces:
Sleeping
Sleeping
File size: 929 Bytes
baff4e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import gradio as gr
import requests
def generate_answer(prompt):
# The URL of the Flask server
url = 'https://entelidemo.replit.app/generate_answer'
# The payload in JSON format
payload = {'prompt': prompt}
# Make a POST request to the server
response = requests.post(url, json=payload)
if response.status_code == 200:
return str(response.json())
else:
return "An error occurred"
def main():
interface = gr.Interface(
fn=generate_answer,
inputs="text",
outputs="text",
title="Enteli-49B Demo",
description="Normally model remembers its past conversations, however for demo purposes this feature is not included. Again it can be a bit slow since it is a demo only. System Prompt: You are a helpful AI assistant called Enteli developed by the AI company EnteliMind."
)
interface.launch()
if __name__ == "__main__":
main()
|