Spaces:
Sleeping
Sleeping
import platform | |
import pathlib | |
import os | |
import gradio as gr | |
import random | |
import time | |
from gradio_client import Client | |
plt = platform.system() | |
pathlib.WindowsPath = pathlib.PosixPath | |
api = os.environ['API'] | |
def chat(message,history): | |
client = Client(api) | |
result = client.predict( | |
message, | |
api_name="/chat" | |
) | |
return result | |
description=''' | |
<br/> | |
π AI Chat Bot is available worldwide in over **160 languages**.<br/> | |
π¬ This space is powered by **Huggingface Hosting**.<br/> | |
π This space runs **very fast** even on **CPU**.<br/> | |
<a href="https://www.facebook.com/MohammedAlakras">π Facebook Account. </a><br/> | |
<a href="https://github.com/mohammedalakhras/">π Github Account. </a><br/> | |
''' | |
gr.ChatInterface(chat, title='Mohammed Alakhras AI Chat Bot π¬', description=description).launch(share=True) |